public void IncomeCreateTest() { Income incomeTest = new Income(); incomeTest.Name = "Name test"; incomeTest.Description = "Description test"; Assert.IsTrue(incomeTest.Update() >= 0); incomeTest.Delete(); }
public void IncomeDeleteTest() { Income incomeTest = new Income(); incomeTest.Name = "Name test"; incomeTest.Description = "Description test"; long id = incomeTest.Update(); Assert.IsFalse(incomeTest.IsNull()); incomeTest.Delete(); Assert.IsTrue(incomeTest.IsNull()); }
public void IncomeLoadTest() { Income incomeTest = new Income(); incomeTest.Name = "Name test"; incomeTest.Description = "Description test"; long id = incomeTest.Update(); Income incomeTest2 = new Income(id); Assert.AreEqual(incomeTest.Id, incomeTest2.Id); incomeTest.Delete(); incomeTest2.Delete(); }
public void IncomeUpdateTest() { Random r = new Random(); string expected = r.Next(0, 10000).ToString(); Income incomeTest = new Income(); incomeTest.Name = "Name test"; incomeTest.Description = "Description test"; long id = incomeTest.Update(); incomeTest.Description = expected; incomeTest.Update(); Income incomeTest2 = new Income(id); Assert.AreEqual(expected, incomeTest2.Description); incomeTest.Delete(); incomeTest2.Delete(); }