@Test public void testOscarFactory() { AbstractAwardFactory abstractAwardFactory = AbstractAwardFactory.getInstance("Academy Award"); assertTrue(abstractAwardFactory instanceof OscarAwardFactory); AwardYearManager awardYearManager = abstractAwardFactory.getAwardYearFactory(); assertTrue(awardYearManager instanceof OscarAwardYearManager); AwardMovieManager awardMovieManager = abstractAwardFactory.getAwardMovieFactory(); assertTrue(awardMovieManager instanceof OscarAwardMovieManager); }
@Test public void testCannesFactory() { AbstractAwardFactory abstractAwardFactory = AbstractAwardFactory.getInstance("Cannes Film Festival"); assertTrue(abstractAwardFactory instanceof CannesFilmFestivalAwardFactory); AwardYearManager awardYearManager = abstractAwardFactory.getAwardYearFactory(); assertTrue(awardYearManager instanceof CannesGoldenPalmsAwardYearManager); AwardMovieManager awardMovieManager = abstractAwardFactory.getAwardMovieFactory(); assertTrue(awardMovieManager instanceof CannesGoldenPalmsAwardMovieManager); }