Exemplo n.º 1
0
        public void GetAdapterType_role_names_are_case_insensitive()
        {
            Type correct = typeof(ABuilder3);

            Assert.Equal(correct, Adaptable.GetAdapterType(typeof(A), "Builder"));
            Assert.Equal(correct, Adaptable.GetAdapterType(typeof(A), "builder"));
        }
Exemplo n.º 2
0
        public void GetAdapterType_should_be_equivalent_to_name_adapters_or_use_builder_attribute()
        {
            Type correct = typeof(ABuilder3);

            // Using the BuilderAttribute
            Assert.Equal(correct, Adaptable.GetBuilderType(typeof(A)));
            Assert.Equal(correct, Adaptable.GetAdapterType(typeof(A), "Builder"));

            // Using the AdapterAttribute
            Assert.Equal(correct, Adaptable.GetBuilderType(typeof(B)));
            Assert.Equal(correct, Adaptable.GetAdapterType(typeof(B), "Builder"));
        }
Exemplo n.º 3
0
 public void GetAdapterType_works_with_builder_role_name()
 {
     Assert.Equal(typeof(EBuilder), Adaptable.GetAdapterType(typeof(E), "Builder"));
 }