Exemplo n.º 1
0
        public void LoadingItemToDbEntityForm()
        {
            GenericDatabaseManager.GetDatabaseManager(DatabaseType.MySQL).CreateTable<SampleTable1>();
            Assert.IsTrue(GenericDatabaseManager.GetDatabaseManager(DatabaseType.MySQL).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));
        }
Exemplo n.º 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));
        }