public void TestPrimaryResolverWithTableAttributeAndWithPrimaryProperty() { // Setup var resolver = new PrimaryResolver(); // Act var result = resolver.Resolve(typeof(EntityModelWithTableAttributeAndPrimaryProperty))?.GetMappedName(); var expected = "TableId"; // Assert Assert.AreEqual(expected, result); }
public void TestPrimaryResolverWithKeyAttribute() { // Setup var resolver = new PrimaryResolver(); // Act var result = resolver.Resolve(typeof(EntityModelWithKeyAttribute))?.GetMappedName(); var expected = "PrimaryId"; // Assert Assert.AreEqual(expected, result); }
public void TestPrimaryResolverWithKeyAttributeAndMappings() { // Setup var resolver = new PrimaryResolver(); FluentMapper .Entity <EntityModelWithKeyAttribute>() .Primary(e => e.SecondaryId); // Act var result = resolver.Resolve(typeof(EntityModelWithKeyAttribute))?.GetMappedName(); var expected = "PrimaryId"; // Assert Assert.AreEqual(expected, result); }