Пример #1
0
        public void LoadingItemToDbEntityForm()
        {
            GenericDatabaseManager.GetDatabaseManager(DatabaseType.SqlCE).CreateTable<SampleTable1>();
            Assert.IsTrue(GenericDatabaseManager.GetDatabaseManager(DatabaseType.SqlCE).TableExist<SampleTable1>());

            var inserted_entry = new SampleTable1 { Column1 = 1, Column2 = "Sample Data" };
            var frmSampleTable = DatabaseEntityForm.ShowWindow<frmSampleTable1>(inserted_entry);
            var retrieved_entry = frmSampleTable.GetUpdatedEntity();
            frmSampleTable.Close();

            Assert.IsTrue(inserted_entry.Equals(retrieved_entry));
        }
Пример #2
0
        public void CheckEqualObjects()
        {
            var entry_1 = new SampleTable1 { Column1 = 1, Column2 = "Sample Data" };
            var entry_2 = new SampleTable1 { Column1 = 1, Column2 = "Sample Data" };

            Assert.IsTrue(entry_1.Equals(entry_2));
        }