Пример #1
0
        public async Task GetOrderStatusByNameShouldReturnOne()
        {
            var orderStatusRepo    = new Repository <OrderStatus>(db);
            var orderStatusService = new OrderStatusService(orderStatusRepo);

            await orderStatusService.CreateOrderStatusAsync("Test");

            var currentOrderSatatus = await orderStatusService.GetOrderStatusByName("Test");

            var expected = 1;
            var actual   = currentOrderSatatus.Id;

            Assert.Equal(expected, actual);
        }
Пример #2
0
        public async Task GetAllOrderStatusesNamesAsyncShouldReturnOne()
        {
            var orderStatusRepo    = new Repository <OrderStatus>(db);
            var orderStatusService = new OrderStatusService(orderStatusRepo);

            await orderStatusService.CreateOrderStatusAsync("Test");

            var allOrderSatatuses = await orderStatusService.GetAllOrderStatusesNamesAsync();

            var expected = 1;
            var actual   = allOrderSatatuses.Count;

            Assert.Equal(expected, actual);
        }