如何使用Mockito FrameWork模拟mongoTemplate对象?

时间:2019-10-24 15:00:18

标签: java mockito

@RunWith(MockitoJUnitRunner.class)
public class EmailServiceTest {

//    @InjectMocks
    private EmailService emailService;

    @Mock
    private JavaMailSender javaMailSender;

    @Mock
    private MongoTemplate mongoTemplate;

    @Mock
    private FileStorageProperties fileStorageProperties;

    @Mock
    private Path fileStorageLocation;
}

0 个答案:

没有答案