Example #1
0
        public void AccountCreateTest()
        {
            Account accountTest = new Account();

            accountTest.Name        = "Name test";
            accountTest.Description = "Description test";
            Assert.IsTrue(accountTest.Update() >= 0);
            accountTest.Delete();
        }
Example #2
0
        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());
        }
Example #3
0
        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();
        }
Example #4
0
        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();
        }