Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class ParentalControlServiceImplTest {
- @Autowired
- ParentalControlService parentalControlService;
- @Before
- public void setUp() throws Exception {
- ParentalControlServiceImpl parentalControlServiceImpl = new ParentalControlServiceImpl();
- parentalControlServiceImpl.setMovieService(new MovieServiceMock());
- parentalControlService = parentalControlServiceImpl;
- }
- @Test
- public void testCanWatchMovie() throws Exception {
- Assert.assertTrue(parentalControlService.canWatchMovie("U", "movie1"));
- }
- @Test(expected= TitleNotFoundException.class)
- public void testCanWatchMovieTwo() throws Exception {
- parentalControlService.canWatchMovie("U","movie756756");
- }
- @Test(expected= TechnicalFailureException.class)
- public void testCanWatchMovieThree() throws Exception {
- parentalControlService.canWatchMovie("U","");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement