public void EntityAttributeDictionary_GetReadOnlyProperty_AttributeExists_Test() { // Arrange // Act var actual = new EntityAttributeDictionary().GetReadOnlyProperty(typeof(Country)); // Assert Assert.AreEqual("@UI.ReadOnly", actual.First().Key); Assert.IsTrue((bool)actual.First().Value); }
public void EntityAttributeDictionary_GetRelatedEntityMappingProperties_AttributeWithAliasExists_Test() { // Arrange // Act var actual = new EntityAttributeDictionary().GetRelatedEntityMappingProperties(typeof(EntityWithRelatedEntityAlias)); // Assert Assert.AreEqual("E2s", actual.First().Key); Assert.AreEqual(typeof(CsdlNavigationProperty), actual.First().Value.GetType()); }
public void EntityAttributeDictionary_GetDisplayProperty_DisplayColumnAttributeExists_Test() { // Arrange // Act var actual = new EntityAttributeDictionary().GetDisplayProperty(typeof(Smile)); // Assert Assert.AreEqual("@UI.DisplayProperty", actual.First().Key); Assert.AreEqual("SmileType", actual.First().Value); }
public void EntityAttributeDictionary_GetRelatedEntityForeignProperties_AttributeExists_Test() { // Arrange // Act var actual = new EntityAttributeDictionary().GetRelatedEntityForeignProperties(typeof(Product)); // Assert Assert.AreEqual("Skus", actual.First().Key); Assert.AreEqual(typeof(CsdlNavigationProperty), actual.First().Value.GetType()); }