@Override protected TemplateLibrary getLibrary() { MutableTemplateLibrary library= new MutableTemplateLibrary(); library.registerHandler(PersonContainerHandler.class); return new ImmutableTemplateLibrary(library); }
@Test public void testRegisterMisannotatedResourceHandler$basicContainer() throws Exception { try { this.sut.registerHandler(Fixture.Invalid.ResourceHC.AnnotatedAsBasicContainer.class); fail("Should not allow registering resource handlers annotated as basic containers"); } catch (Exception e) { logFailure(e); } }
@Test public void testEmptyMembershipPredicate$directContainer() throws Exception { try { this.sut.registerHandler(Fixture.Invalid.ContainerHC.Direct.EmptyMembershipPredicate.class); fail("Should not allow registering container handlers annotated as direct containers with no membership predicate"); } catch (Exception e) { logFailure(e); } }
@Test public void testNullMembershipPredicate$directContainer() throws Exception { try { this.sut.registerHandler(Fixture.Invalid.ContainerHC.Direct.NullMembershipPredicate.class); fail("Should not allow registering container handlers annotated as direct containers with null membership predicate"); } catch (Exception e) { logFailure(e); } }
@Test public void testBadMembershipPredicate$indirectContainer() throws Exception { try { this.sut.registerHandler(Fixture.Invalid.ContainerHC.Indirect.BadMembershipPredicate.class); fail("Should not allow registering container handlers annotated as indirect containers with bad membership predicate"); } catch (Exception e) { logFailure(e); } }
@Test public void testRegisterContainerHandlerWithMultipleContainerAnnotations() throws Exception { try { this.sut.registerHandler(Fixture.Invalid.MultipleContainerAnnotations.class); fail("Should not allow registering container handlers with multiple container annotations"); } catch (Exception e) { logFailure(e); } }
@Test public void testBadMembershipPredicate$directContainer() throws Exception { try { this.sut.registerHandler(Fixture.Invalid.ContainerHC.Direct.BadMembershipPredicate.class); fail("Should not allow registering container handlers annotated as direct containers with bad membership predicate"); } catch (Exception e) { logFailure(e); } }
@Test public void testNullInsertedContentRelation() throws Exception { try { this.sut.registerHandler(Fixture.Invalid.ContainerHC.Indirect.NullInsertedContentRelation.class); fail("Should not allow registering container handlers annotated as indirect containers with null inserted content relation"); } catch (Exception e) { logFailure(e); } }
@Test public void testBadInsertedContentRelation() throws Exception { try { this.sut.registerHandler(Fixture.Invalid.ContainerHC.Indirect.BadInsertedContentRelation.class); fail("Should not allow registering container handlers annotated as indirect containers with bad inserted content relation"); } catch (Exception e) { logFailure(e); } }
@Test public void testRegisterUnannotatedResourceHandler$unknownAnnotations() throws Exception { try { this.sut.registerHandler(Fixture.Invalid.ResourceHC.AnnotatedWithUnsupportedAnnotation.class); fail("Should not allow registering resource handlers without a know annotation"); } catch (Exception e) { logFailure(e); } }
@Test public void testRegisterContainerWithUnannotatedMemberHandler$indirectContainer() throws Exception { try { this.sut.registerHandler(Fixture.Invalid.ContainerHC.Indirect.UnnanotatedMemberResourceHandler.class); fail("Should not allow registering container handlers annotated as indirect containers with unnanotated member handlers"); } catch (Exception e) { logFailure(e); } }
@Test public void testRegisterContainerHandlerWithMixedTypeAnnotations() throws Exception { try { this.sut.registerHandler(Fixture.Invalid.MixedTypeAnnotations.class); fail("Should not allow registering container handlers with multiple mixed annotations"); } catch (Exception e) { logFailure(e); } }
@Test public void testEmptyId$basicContainer() throws Exception { try { this.sut.registerHandler(Fixture.Invalid.ContainerHC.Basic.EmptyID.class); fail("Should not allow registering container handlers annotated as basic containers with no id"); } catch (Exception e) { logFailure(e); } }
@Test public void testRelativeMembershipPredicate$directContainer() throws Exception { try { this.sut.registerHandler(Fixture.Invalid.ContainerHC.Direct.RelativeMembershipPredicate.class); fail("Should not allow registering container handlers annotated as direct containers with relative membership predicate"); } catch (Exception e) { logFailure(e); } }
@Test public void testEmptyInsertedContentRelation() throws Exception { try { this.sut.registerHandler(Fixture.Invalid.ContainerHC.Indirect.EmptyInsertedContentRelation.class); fail("Should not allow registering container handlers annotated as indirect containers with empty inserted content relation"); } catch (Exception e) { logFailure(e); } }
@Test public void testRelativeInsertedContentRelation() throws Exception { try { this.sut.registerHandler(Fixture.Invalid.ContainerHC.Indirect.RelativeInsertedContentRelation.class); fail("Should not allow registering container handlers annotated as indirect containers with relative inserted content relation"); } catch (Exception e) { logFailure(e); } }
@Test public void testRegisterUnannotatedContainerHandler() throws Exception { try { this.sut.registerHandler(Fixture.Invalid.ContainerHC.Unannotated.class); fail("Should not allow registering unnanotated container handlers"); } catch (Exception e) { logFailure(e); } }
@Test public void testRegisterContainerWithUnannotatedMemberHandler$basicContainer() throws Exception { try { this.sut.registerHandler(Fixture.Invalid.ContainerHC.Basic.UnnanotatedMemberResourceHandler.class); fail("Should not allow registering container handlers annotated as direct containers with unnanotated member handlers"); } catch (Exception e) { logFailure(e); } }
@Test public void testEmptyId$resource() throws Exception { try { this.sut.registerHandler(Fixture.Invalid.ResourceHC.EmptyID.class); fail("Should not allow registering resource handlers annotated as resources with no id"); } catch (Exception e) { logFailure(e); } }
@Test public void testEmptyId$indirectContainer() throws Exception { try { this.sut.registerHandler(Fixture.Invalid.ContainerHC.Indirect.EmptyID.class); fail("Should not allow registering container handlers annotated as indirect containers with no id"); } catch (Exception e) { logFailure(e); } }