Esempio n. 1
0
        public void DatabaseGetFieldNames()
        {
            int record;

            record = DatabaseStoreStatic.NewRecord();
            Assert.IsEmpty(DatabaseStoreStatic.GetFieldNames(record));
            DatabaseStoreStatic.SetField(record, "author", "first author");
            DatabaseStoreStatic.SetField(record, "title", "title");
            Assert.AreEqual(2, DatabaseStoreStatic.GetFieldNames(record).Count);
            Assert.IsTrue(DatabaseStoreStatic.GetFieldNames(record).Contains("author"));
            Assert.IsTrue(DatabaseStoreStatic.GetFieldNames(record).Contains("title"));
            Assert.IsFalse(DatabaseStoreStatic.GetFieldNames(record).Contains("journal"));
            DatabaseStoreStatic.DeleteRecord(record);
            Assert.IsEmpty(DatabaseStoreStatic.GetFieldNames(record));
        }