public void TestBasicReisAddGetUpdateDelete() { //Add-Get-Тест DateTime date = DateTime.Now; BasicReis expectedBasicReis = new BasicReis(); expectedBasicReis.Date = date; DataAccessBasicReis basicReis = new DataAccessBasicReis(); basicReis.AddElement(expectedBasicReis); var actualBasicReis = basicReis.GetAll().Last(); Assert.AreEqual(expectedBasicReis, actualBasicReis); //Update - Тест expectedBasicReis = actualBasicReis; expectedBasicReis.Date = date.AddDays(2); basicReis.UpdateElement(expectedBasicReis); actualBasicReis = basicReis.GetElement(expectedBasicReis.CodeBasicReis); Assert.AreEqual(expectedBasicReis, actualBasicReis); //Delete-Тест int expectedCount = basicReis.GetAll().Count() - 1; basicReis.DeleteElement(actualBasicReis); int actualCount = basicReis.GetAll().Count(); Assert.AreEqual(expectedCount, actualCount); }
private void detach_BasicReis(BasicReis entity) { this.SendPropertyChanging(); entity.Plains = null; }
private void attach_BasicReis(BasicReis entity) { this.SendPropertyChanging(); entity.Plains = this; }
partial void DeleteBasicReis(BasicReis instance);
partial void UpdateBasicReis(BasicReis instance);
partial void InsertBasicReis(BasicReis instance);