Esempio n. 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));
        }
Esempio n. 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);
        }
Esempio n. 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);
        }
Esempio n. 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);
        }
Esempio n. 5
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);
        }
Esempio n. 6
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);
        }
Esempio n. 7
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));
        }
Esempio n. 8
0
        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);
        }