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_Expected_Type_With_Exclusions(Type t) { //arrange ITypeRelationalMapper mapper = new PrimitiveTypeRelationalMapper(new UnityPrimitiveTypeExclusion()); //act Type mappedType = mapper.ResolveMappedType(t); //assert Assert.AreEqual(t, mappedType); }
[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); }
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_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); }