public void AccountCreateTest() { Account accountTest = new Account(); accountTest.Name = "Name test"; accountTest.Description = "Description test"; Assert.IsTrue(accountTest.Update() >= 0); accountTest.Delete(); }
public void AccountDeleteTest() { Account accountTest = new Account(); accountTest.Name = "Name test"; accountTest.Description = "Description test"; long id = accountTest.Update(); Assert.IsFalse(accountTest.IsNull()); accountTest.Delete(); Assert.IsTrue(accountTest.IsNull()); }
public void AccountLoadTest() { Account accountTest = new Account(); accountTest.Name = "Name test"; accountTest.Description = "Description test"; long id = accountTest.Update(); Account accountTest2 = new Account(id); Assert.AreEqual(accountTest.Id, accountTest2.Id); accountTest.Delete(); accountTest2.Delete(); }
public void AccountUpdateTest() { Random r = new Random(); string expected = r.Next(0, 10000).ToString(); Account accountTest = new Account(); accountTest.Name = "Name test"; accountTest.Description = "Description test"; long id = accountTest.Update(); accountTest.Description = expected; accountTest.Update(); Account accountTest2 = new Account(id); Assert.AreEqual(expected, accountTest2.Description); accountTest.Delete(); accountTest2.Delete(); }