public void TestClassMappedNameResolverWithMapAndTableAttribute() { // Setup var resolver = new ClassMappedNameResolver(); // Act var result = resolver.Resolve(typeof(EntityModelWithMapAndTableAttribute)); var expected = "[dbo].[Map]"; // Assert Assert.AreEqual(expected, result); }
public void TestClassMappedNameResolverWithoutAttribute() { // Setup var resolver = new ClassMappedNameResolver(); // Act var result = resolver.Resolve(typeof(EntityModel)); var expected = "EntityModel"; // Assert Assert.AreEqual(expected, result); }
public void TestClassMappedNameResolverWithMapAttributeAndMappings() { // Setup var resolver = new ClassMappedNameResolver(); FluentMapper .Entity <EntityModelWithMapAttribute>() .Table("[dbo].[Mapping]"); // Act var result = resolver.Resolve(typeof(EntityModelWithMapAttribute)); var expected = "[dbo].[Map]"; // Assert Assert.AreEqual(expected, result); }