public void TestTypicalLengthAnnotationPickedUpOnClass() { facetFactory.Process(Reflector, typeof(Customer), MethodRemover, Specification); IFacet facet = Specification.GetFacet(typeof(ITypicalLengthFacet)); Assert.IsNotNull(facet); Assert.IsTrue(facet is TypicalLengthFacetAnnotation); var typicalLengthFacetAnnotation = (TypicalLengthFacetAnnotation)facet; Assert.AreEqual(16, typicalLengthFacetAnnotation.Value); }
public void TestTypicalLengthAnnotationPickedUpOnClass() { IImmutableDictionary <string, ITypeSpecBuilder> metamodel = new Dictionary <string, ITypeSpecBuilder>().ToImmutableDictionary(); metamodel = facetFactory.Process(Reflector, typeof(Customer), MethodRemover, Specification, metamodel); var facet = Specification.GetFacet(typeof(ITypicalLengthFacet)); Assert.IsNotNull(facet); Assert.IsTrue(facet is TypicalLengthFacetAnnotation); var typicalLengthFacetAnnotation = (TypicalLengthFacetAnnotation)facet; Assert.AreEqual(16, typicalLengthFacetAnnotation.Value); Assert.IsNotNull(metamodel); }