示例#1
0
        public void ShouldBeAbleToUpdateAccount()
        {
            var        random       = new Random();
            var        randonNumber = random.Next(0, 1000);
            SugarEntry entry        = _cw.GetEntry(SugarModules.Accounts, GetAccountId());

            Assert.IsNotNull(entry);
            Assert.IsNotEmpty(entry);
            Console.WriteLine(entry["name"]);
            entry["employees"] = randonNumber.ToString();
            var test = _cw.SetEntry(entry);

            Console.WriteLine(test);
            entry = _cw.GetEntry(SugarModules.Accounts, GetAccountId());
            Assert.AreEqual(randonNumber.ToString(), entry["employees"]);
        }