GetPrimaryKeys() public méthode

public GetPrimaryKeys ( ) : IList
Résultat IList
Exemple #1
0
        public void PrimaryKey()
        {
            TesteObj obj = new TesteObj();

            Assert.IsNotNull(obj.GetPrimaryKeys(), "PrimaryKey is null");
            Assert.AreEqual(1, obj.GetPrimaryKeys().Count, "PrimaryKey size is not 1");
            Assert.AreEqual("ID", ((PropertyInfo) obj.GetPrimaryKeys()[0]).Name, "PrimaryKey not found");
            Assert.AreEqual("Cod", ((Column)((PropertyInfo) obj.GetPrimaryKeys()[0]).GetCustomAttributes(typeof(Column), true)[0]).Name, "PrimaryKey properties not found");
        }