Exemple #1
0
        public static void Test_PrimitiveTypeMapper_Throws_On_Exclusion(Type t)
        {
            //arrange
            ITypeRelationalMapper mapper = new PrimitiveTypeRelationalMapper(new UnityPrimitiveTypeExclusion());

            //act
            Assert.Throws <InvalidOperationException>(() => mapper.ResolveMappedType(t));
        }
Exemple #2
0
        public static void Test_PrimitiveTypeMapper_Returns_Expected_Type_With_Exclusions(Type t)
        {
            //arrange
            ITypeRelationalMapper mapper = new PrimitiveTypeRelationalMapper(new UnityPrimitiveTypeExclusion());

            //act
            Type mappedType = mapper.ResolveMappedType(t);

            //assert
            Assert.AreEqual(t, mappedType);
        }
Exemple #3
0
        [TestCase(typeof(string))]         //string is not a primitve
        public static void Test_PrimitiveTypeMapper_Returns_Null_On_Invalid_Type(Type t)
        {
            //arrange
            ITypeRelationalMapper mapper = new PrimitiveTypeRelationalMapper(Enumerable.Empty <Type>());

            //act
            Type mappedType = mapper.ResolveMappedType(t);

            //assert
            Assert.IsNull(mappedType);
        }
Exemple #4
0
        public static void Test_PrimitiveTypeMapper_Returns_Expected_Type(Type t)
        {
            //arrange
            ITypeRelationalMapper mapper = new PrimitiveTypeRelationalMapper(Enumerable.Empty <Type>());

            //act
            Type mappedType = mapper.ResolveMappedType(t);

            //assert
            Assert.AreEqual(t, mappedType);
        }
        public static void Test_PrimitiveTypeMapper_Returns_Expected_Type(Type t)
        {
            //arrange
            ITypeRelationalMapper mapper = new PrimitiveTypeRelationalMapper(Enumerable.Empty<Type>());

            //act
            Type mappedType = mapper.ResolveMappedType(t);

            //assert
            Assert.AreEqual(t, mappedType);
        }
        public static void Test_PrimitiveTypeMapper_Returns_Expected_Type_With_Exclusions(Type t)
        {
            //arrange
            ITypeRelationalMapper mapper = new PrimitiveTypeRelationalMapper(new UnityPrimitiveTypeExclusion());

            //act
            Type mappedType = mapper.ResolveMappedType(t);

            //assert
            Assert.AreEqual(t, mappedType);
        }
        public static void Test_PrimitiveTypeMapper_Throws_On_Exclusion(Type t)
        {
            //arrange
            ITypeRelationalMapper mapper = new PrimitiveTypeRelationalMapper(new UnityPrimitiveTypeExclusion());

            //act
            Assert.Throws<InvalidOperationException>(() => mapper.ResolveMappedType(t));
        }
        public static void Test_PrimitiveTypeMapper_Returns_Null_On_Invalid_Type(Type t)
        {
            //arrange
            ITypeRelationalMapper mapper = new PrimitiveTypeRelationalMapper(Enumerable.Empty<Type>());

            //act
            Type mappedType = mapper.ResolveMappedType(t);

            //assert
            Assert.IsNull(mappedType);
        }