Пример #1
0
        public void TestListStoreQueuesAsync()
        {
            ContextSeeder.Seed();
            var bo      = new StoreQueueBusinessObject();
            var resList = bo.ListAsync().Result;

            Assert.IsTrue(resList.Success && resList.Result.Count == 1);
        }
Пример #2
0
        public void TestDeleteStoreQueuesAsync()
        {
            ContextSeeder.Seed();
            var bo        = new StoreQueueBusinessObject();
            var resList   = bo.ListAsync().Result;
            var resDelete = bo.DeleteAsync(resList.Result.First().Id).Result;

            resList = bo.ListNotDeletedAsync().Result;
            Assert.IsTrue(resDelete.Success && resList.Success && resList.Result.Count == 0);
        }
Пример #3
0
        public void TestUpdateStoreQueueAsync()
        {
            ContextSeeder.Seed();
            var bo       = new StoreQueueBusinessObject();
            var stoQList = bo.ListAsync().Result;
            var item     = stoQList.Result.FirstOrDefault();

            item.Quantity = 11;
            var stoQUpdate = bo.UpdateAsync(item).Result;

            stoQList = bo.ListNotDeletedAsync().Result;
            Assert.IsTrue(stoQList.Success && stoQUpdate.Success && stoQList.Result.First().Quantity == 11);
        }