Beispiel #1
0
        public void TestCreateOrder()
        {
            // Wieso schlägt dieser Test auf Zeile 18 fehlt???
            var context = MockContextFactory.Create();

            var table = new Table()
            {
                Id     = 3,
                Name   = "albertus",
                Orders = new List <Order>()
            };

            var waiter = new Tablet()
            {
                Id         = 4,
                Identifier = "brutus",
                Mode       = Mode.Waiter
            };

            context.Table.Add(table);
            context.Tablet.Add(waiter);
            context.SaveChanges();

            var service = new OrderService(new MockDataService(context));
            var result  = service.CreateOrder(table.Id, waiter.Identifier);

            Assert.Equal(OrderStatus.New, result.OrderStatus);
            Assert.Equal(result.UpdateTime, result.CreationTime);
            Assert.Equal(0, result.PriceOrder);
        }
        public void TestItemTypUpdate()
        {
            var context = MockContextFactory.Create();

            var testItem = new Database.Models.Itemtyp()
            {
                Id          = 1,
                Number      = 1,
                Title       = "Hamburger",
                Description = "Knuspriges Brot, belegt mit Käse, Speck und Hamburger",
                ItemPrice   = 24,
                Category    = Database.Models.Category.Normal,
                Image       = "Bild von Hamburger",
                Priority    = 2
            };

            context.Itemtyp.Add(testItem);
            context.SaveChanges();

            var service = new ItemTypeService(new MockDataService(context));
            var result  = service.GetItemTypes(0);

            Assert.Equal("Hamburger", result.ElementAt(0).Title);

            testItem.Title       = "Veggiburger";
            testItem.Description = "Knuspriges Brot, belegt mit Käse und Tofu";
            testItem.Image       = "Bild von Veggiburger";

            Assert.False(result.ElementAt(0).Title == "Hamburger");
        }
        public void TestOnOrderAssignedWI()
        {
            var context = MockContextFactory.Create();


            String fakeIdentifier = "Laptop";

            var waiter = new Tablet()
            {
                Id         = 2,
                Identifier = "Karim",
                Mode       = Mode.Waiter
            };

            var testOrder = new Order()
            {
                Id           = 1,
                OrderStatus  = OrderStatus.New,
                CreationTime = new DateTime(2017, 2, 4, 17, 0, 0),
                UpdateTime   = new DateTime(2017, 2, 4, 17, 0, 0),
                Waiter       = waiter,
                Guests       = new List <Tablet>()
            };

            context.Tablet.Add(waiter);
            context.Order.Add(testOrder);
            context.SaveChanges();

            var service = new AssignOrderService(new MockDataService(context));
            var result  = service.OnOrderAssigned(fakeIdentifier, testOrder.Id);

            Assert.Equal(false, result);
        }
Beispiel #4
0
        public void TestTabletHub()
        {
            var context = MockContextFactory.Create();

            var tabletService = new TabletService(new MockDataService(context));


            var request = new GetTabletsByModeRequest();

            request.Mode = Database.Models.Mode.Waiter;

            var command = new Command <GetTabletsByModeRequest>();

            command.RequestId = "123";
            command.Arguments = request;

            var called = false;

            var hub = new TabletHub(tabletService);


            var responseType = "GetTabletsByModeResponse";
            var action       = new Action <Command <GetTabletsByModeResponse> >((response) =>
            {
                Assert.Equal(response.RequestId, command.RequestId);
                Assert.NotNull(response.Arguments.Tablets);
                called = true;
            });

            hub.Clients = MockHubFactory.CreateClients(responseType, action);
            hub.GetTabletsByModeRequest(command);

            Assert.True(called);
        }
        public void TestGetItemTypeDetails()
        {
            var context = MockContextFactory.Create();

            var testItem = new Database.Models.Itemtyp()
            {
                Id          = 1,
                Number      = 1,
                Title       = "Hamburger",
                Description = "Knuspriges Brot, belegt mit Käse, Speck und Hamburger",
                ItemPrice   = 24,
                Category    = Database.Models.Category.Normal,
                Image       = "Bild von Hamburger",
                Priority    = 2
            };

            context.Itemtyp.Add(testItem);
            context.SaveChanges();

            var service = new ItemTypeService(new MockDataService(context));
            var result  = service.GetItemTypes(0);

            Assert.Equal(1, result.ElementAt(0).Id);
            Assert.Equal(1, result.ElementAt(0).Number);
            Assert.Equal("Hamburger", result.ElementAt(0).Title);
            Assert.Equal("Knuspriges Brot, belegt mit Käse, Speck und Hamburger", result.ElementAt(0).Description);
            Assert.Equal(24, result.ElementAt(0).ItemPrice);
            Assert.Equal("Normal", result.ElementAt(0).Category.ToString());
            Assert.Equal("Bild von Hamburger", result.ElementAt(0).Image);
            Assert.Equal(2, result.ElementAt(0).Priority);
        }
        public void TestMenuUpdate()
        {
            var context = MockContextFactory.Create();

            var testMenu = new Database.Models.Menu()
            {
                Id          = 1,
                Number      = 1,
                Name        = "Sommermenü",
                Description = "Feine Sommerspeisen",
            };

            context.Menu.Add(testMenu);
            context.SaveChanges();

            var service = new MenuService(new MockDataService(context));
            var result  = service.GetMenus();

            Assert.Equal("Sommermenü", result.ElementAt(0).Name);

            testMenu.Name        = "Wintermenü";
            testMenu.Description = "Feine Winterspeisen";

            Assert.False(result.ElementAt(0).Name == "Sommermenü");
        }
Beispiel #7
0
        public void TestDoChangeOrderStatus()
        {
            var context = MockContextFactory.Create();

            var tablet = new Tablet()
            {
                Id         = 5,
                Identifier = "Eugen",
                Mode       = Mode.Waiter
            };

            var table = new Table()
            {
                Id   = 5,
                Name = "TestTisch"
            };
            var order4 = new Order
            {
                Id          = 2,
                OrderStatus = OrderStatus.New,
                PriceOrder  = 3,
                TableId     = 7,
                Waiter      = tablet,
                Table       = table
            };

            context.Order.Add(order4);
            context.SaveChanges();

            var service = new OrderService(new MockDataService(context));
            var result  = service.DoChangeOrderStatus(2, OrderStatus.Done);

            Assert.Equal(OrderStatus.Done, result.OrderStatus);
        }
        public void TestSubmenuUpdate()
        {
            var context = MockContextFactory.Create();

            var testSubmenu = new Database.Models.Submenu()
            {
                Id          = 1,
                Number      = 1,
                Name        = "Vorspeisen",
                Description = "Vorspeisen"
            };

            context.Submenu.Add(testSubmenu);
            context.SaveChanges();

            var service = new SubmenuService(new MockDataService(context));
            var result  = service.GetSubmenus(0);

            Assert.Equal("Vorspeisen", result.ElementAt(0).Name);

            testSubmenu.Name        = "Hauptspeisen";
            testSubmenu.Description = "Hauptspeisen";

            Assert.False(result.ElementAt(0).Name == "Vorspeisen");
        }
        public void TestItemTypeCount()
        {
            var context = MockContextFactory.Create();

            var testItem1 = new Database.Models.Itemtyp()
            {
                Id          = 1,
                Number      = 1,
                Title       = "Hamburger",
                Description = "Knuspriges Brot, belegt mit Käse, Speck und Hamburger",
                ItemPrice   = 24,
                Category    = Database.Models.Category.Normal,
                Image       = "Bild von Hamburger",
                Priority    = 2
            };

            var testItem2 = new Database.Models.Itemtyp()
            {
                Id          = 2,
                Number      = 2,
                Title       = "Toast Hawai",
                Description = "Knuspriges Toast, garniert mit Schinken und Ananas",
                ItemPrice   = 10,
                Category    = Database.Models.Category.Normal,
                Image       = "Bild von Toast",
                Priority    = 2
            };

            var testItem3 = new Database.Models.Itemtyp()
            {
                Id          = 3,
                Number      = 3,
                Title       = "Spaghetti Pesto",
                Description = "Spaghetti al Dente mit hauseigener Pestosauce",
                ItemPrice   = 20,
                Category    = Database.Models.Category.Vegi,
                Image       = "Bild von Spaghetti",
                Priority    = 2
            };

            context.Itemtyp.Add(testItem1);
            context.Itemtyp.Add(testItem2);
            context.Itemtyp.Add(testItem3);
            context.SaveChanges();

            var service = new ItemTypeService(new MockDataService(context));
            var result  = service.GetItemTypes(0);

            Assert.Equal(3, result.Count());

            context.Itemtyp.Remove(testItem1);
            context.SaveChanges();
            result = service.GetItemTypes(0);

            Assert.Equal(2, result.Count());
        }
Beispiel #10
0
        public void TestGetOrdersByWaiter()
        {
            var context = MockContextFactory.Create();

            var waiter = new Tablet
            {
                Id         = 3,
                Identifier = "Georg",
                Mode       = Mode.Waiter
            };

            var tableAlpha = new Table()
            {
                Id   = 6,
                Name = "Test"
            };

            var tableBeta = new Table()
            {
                Id   = 9,
                Name = "TestB"
            };

            var order1 = new Order
            {
                Id          = 4,
                OrderStatus = OrderStatus.New,
                PriceOrder  = 0,
                Table       = tableAlpha,
                TableId     = 6,
                Waiter      = waiter
            };

            var order2 = new Order
            {
                Id          = 8,
                OrderStatus = OrderStatus.Active,
                PriceOrder  = 2,
                Table       = tableBeta,
                TableId     = 9,
                Waiter      = waiter
            };

            context.Tablet.Add(waiter);
            context.Order.Add(order1);
            context.Order.Add(order2);
            context.SaveChanges();

            var service = new OrderService(new MockDataService(context));
            var result  = service.GetOrdersByWaiter("Georg");

            Assert.NotNull(result);
            Assert.Equal(order2.PriceOrder, result.FirstOrDefault(t => t.OrderStatus == OrderStatus.Active).PriceOrder);
            Assert.Equal(order1.PriceOrder, result.FirstOrDefault(t => t.OrderStatus == OrderStatus.New).PriceOrder);
        }
        public void TestMenuCount()
        {
            var context = MockContextFactory.Create();

            var testMenu1 = new Database.Models.Menu()
            {
                Id          = 1,
                Number      = 1,
                Name        = "Wintermenü",
                Description = "Feine Winterspeisen",
            };

            var testMenu2 = new Database.Models.Menu()
            {
                Id          = 2,
                Number      = 2,
                Name        = "Frühlingsmenü",
                Description = "Feine Frühlingsspeisen",
            };

            var testMenu3 = new Database.Models.Menu()
            {
                Id          = 3,
                Number      = 3,
                Name        = "Sommermenü",
                Description = "Feine Sommerspeisen",
            };

            var testMenu4 = new Database.Models.Menu()
            {
                Id          = 4,
                Number      = 4,
                Name        = "Herbstmenü",
                Description = "Feine Herbstspeisen",
            };

            context.Menu.Add(testMenu1);
            context.Menu.Add(testMenu2);
            context.Menu.Add(testMenu3);
            context.Menu.Add(testMenu4);
            context.SaveChanges();

            var service = new MenuService(new MockDataService(context));
            var result  = service.GetMenus();

            Assert.Equal(4, result.Count());

            context.Menu.Remove(testMenu1);
            context.SaveChanges();
            result = service.GetMenus();

            Assert.Equal(3, result.Count());
        }
Beispiel #12
0
        public void TestOrderHub()
        {
            var context            = MockContextFactory.Create();
            var getTablesService   = new TableService(new MockDataService(context));
            var orderService       = new OrderService(new MockDataService(context));
            var orderPosService    = new OrderPosService(new MockDataService(context), orderService);
            var assignOrderService = new AssignOrderService(new MockDataService(context));
            var tabletService      = new TabletService(new MockDataService(context));

            context.Table.Add(new Database.Models.Table
            {
                Id   = 12,
                Name = "Hera",
            });

            context.Tablet.Add(new Database.Models.Tablet
            {
                Id         = 7,
                Identifier = "Mira",
                Mode       = Database.Models.Mode.Guest
            });
            context.SaveChanges();

            var request = new CreateOrderRequest();

            request.TableId          = 12;
            request.TabletIdentifier = "Mira";

            var command = new Command <CreateOrderRequest>();

            command.RequestId = "123";
            command.Arguments = request;

            var called = false;

            var hub = new OrderHub(getTablesService, orderService, orderPosService, assignOrderService, tabletService);

            var responseType = "CreateOrderResponse";
            var action       = new Action <Command <CreateOrderResponse> >((response) =>
            {
                Assert.Equal(response.RequestId, command.RequestId);
                Assert.NotNull(response.Arguments.Order);
                called = true;
            });

            hub.Clients = MockHubFactory.CreateClients(responseType, action);
            hub.CreateOrderRequest(command);

            Assert.True(called);
        }
        public void TestGetAllTables()
        {
            var context = MockContextFactory.Create();

            var testTable = new Database.Models.Table
            {
                Id   = 4,
                Name = "Ektat"
            };

            context.Table.Add(testTable);
            context.SaveChanges();

            var service = new TableService(new MockDataService(context));
            var result  = service.GetAllTables();

            Assert.Equal(1, result.Count());
        }
        public void TestDoUpdateOrderPos()
        {
            var context = MockContextFactory.Create();

            var testOrder = new Order()
            {
                Id           = 1,
                OrderStatus  = OrderStatus.New,
                CreationTime = new DateTime(2017, 2, 4, 17, 0, 0),
                Guests       = new List <Tablet>(),
                Positions    = new List <OrderPos>()
            };

            var testItem1 = new Itemtyp
            {
                Id          = 1,
                Number      = 1,
                Title       = "Burger",
                Description = "Burger with Fries",
                ItemPrice   = 15
            };

            context.Itemtyp.Add(testItem1);
            context.Order.Add(testOrder);
            context.SaveChanges();


            var orderService    = new OrderService(new MockDataService(context));
            var positionService = new OrderPosService(new MockDataService(context), orderService);

            positionService.AddOrderPos(testOrder.Id, testItem1.Id);
            positionService.DoUpdateOrderPosRequest(testOrder.Positions.First().Id, 3, "");
            context.SaveChanges();

            Assert.Equal(45, testOrder.Positions.First().PricePos);

            positionService.DoUpdateOrderPosRequest(testOrder.Positions.First().Id, 1, "");

            Assert.Equal(15, testOrder.Positions.First().PricePos);

            positionService.DoUpdateOrderPosRequest(testOrder.Positions.First().Id, 4, "");

            Assert.Equal(60, testOrder.Positions.First().PricePos);
        }
        public void TestSubmenuCount()
        {
            var context = MockContextFactory.Create();

            var testSubmenu2 = new Database.Models.Submenu()
            {
                Id          = 1,
                Number      = 1,
                Name        = "Vorspeisen",
                Description = "Vorspeisen"
            };

            var testSubmenu3 = new Database.Models.Submenu()
            {
                Id          = 2,
                Number      = 2,
                Name        = "Hauptspeisen",
                Description = "Hauptspeisen"
            };

            var testSubmenu4 = new Database.Models.Submenu()
            {
                Id          = 3,
                Number      = 3,
                Name        = "Desserts",
                Description = "Desserts"
            };

            context.Submenu.Add(testSubmenu2);
            context.Submenu.Add(testSubmenu3);
            context.Submenu.Add(testSubmenu4);
            context.SaveChanges();

            var service = new SubmenuService(new MockDataService(context));
            var result  = service.GetSubmenus(0);

            Assert.Equal(3, result.Count());

            context.Submenu.Remove(testSubmenu2);
            context.SaveChanges();
            result = service.GetSubmenus(0);

            Assert.Equal(2, result.Count());
        }
        public void TestGetTableDetails()
        {
            var context = MockContextFactory.Create();

            var testTable1 = new Database.Models.Table
            {
                Id   = 3,
                Name = "Alta"
            };

            context.Table.Add(testTable1);
            context.SaveChanges();

            var service = new TableService(new MockDataService(context));
            var result  = service.GetAllTables();

            Assert.Equal("Alta", result.ElementAt(0).Name);
            Assert.Equal(3, result.ElementAt(0).Id);
        }
        public void TestGetMenus()
        {
            var context = MockContextFactory.Create();

            var testMenu = new Database.Models.Menu()
            {
                Id          = 1,
                Number      = 1,
                Name        = "Sommermenü",
                Description = "Feine Sommerspeisen",
            };

            context.Menu.Add(testMenu);
            context.SaveChanges();

            var service = new MenuService(new MockDataService(context));
            var result  = service.GetMenus();

            Assert.Equal(1, result.Count());
        }
Beispiel #18
0
        public void TestMenuHub()
        {
            var context = MockContextFactory.Create();

            var getMenuService  = new MenuService(new MockDataService(context));
            var SubmenuService  = new SubmenuService(new MockDataService(context));
            var getItemsService = new ItemTypeService(new MockDataService(context));

            context.Menu.Add(new Database.Models.Menu
            {
                Id          = 1,
                Number      = 1,
                Description = "Sommer",
                Name        = "Sommerspeisen",
            });

            var request = new GetMenuRequest();

            var command = new Command <GetMenuRequest>();

            command.RequestId = "123";
            command.Arguments = request;

            var called = false;

            var hub = new MenuHub(getMenuService, SubmenuService, getItemsService);

            var responseType = "GetMenuResponse";
            var action       = new Action <Command <GetMenuResponse> >((response) =>
            {
                Assert.Equal(response.RequestId, command.RequestId);
                Assert.NotNull(response.Arguments.Menus);
                called = true;
            });

            hub.Clients = MockHubFactory.CreateClients(responseType, action);
            hub.GetMenuRequest(command);

            Assert.True(called);
        }
        public void TestTableCount()
        {
            var context = MockContextFactory.Create();

            var testTable2 = new Database.Models.Table
            {
                Id   = 2,
                Name = "Fusel"
            };

            var testTable3 = new Database.Models.Table
            {
                Id   = 6,
                Name = "Powal"
            };

            var testTable4 = new Database.Models.Table
            {
                Id   = 8,
                Name = "Hunik"
            };

            context.Table.Add(testTable2);
            context.Table.Add(testTable3);
            context.Table.Add(testTable4);
            context.SaveChanges();

            var service = new TableService(new MockDataService(context));
            var result  = service.GetAllTables();

            Assert.Equal(3, result.Count());

            /*context.Table.Remove(testTable2);
             * context.SaveChanges();
             * result = service.GetAllTables();
             *
             * Assert.Equal(2, result.Count());*/
        }
Beispiel #20
0
        public void TestGetOrder()

        {
            var context = MockContextFactory.Create();

            var tablet = new Tablet()
            {
                Id         = 8,
                Identifier = "Brutus",
                Mode       = Mode.Waiter
            };

            var table = new Table()
            {
                Id   = 5,
                Name = "Test"
            };
            var order0 = new Order
            {
                Id          = 3,
                OrderStatus = OrderStatus.New,
                PriceOrder  = 1,
                Table       = table,
                Waiter      = tablet
            };

            context.Table.Add(table);
            context.Tablet.Add(tablet);
            context.Order.Add(order0);
            context.SaveChanges();

            var service = new OrderService(new MockDataService(context));
            var result  = service.GetOrder(3);

            Assert.Equal(1, result.PriceOrder);
            Assert.Equal(OrderStatus.New, result.OrderStatus);
            Assert.Equal(1, result.PriceOrder);
        }
        public void TestGetSubmenuDetails()
        {
            var context = MockContextFactory.Create();

            var testSubmenu1 = new Database.Models.Submenu()
            {
                Id          = 1,
                Number      = 1,
                Name        = "Vorspeisen",
                Description = "Vorspeisen"
            };

            context.Submenu.Add(testSubmenu1);
            context.SaveChanges();

            var service = new SubmenuService(new MockDataService(context));
            var result  = service.GetSubmenus(0);

            Assert.Equal(1, result.ElementAt(0).Id);
            Assert.Equal(1, result.ElementAt(0).Number);
            Assert.Equal("Vorspeisen", result.ElementAt(0).Name);
            Assert.Equal("Vorspeisen", result.ElementAt(0).Description);
        }
        public void TestTableUpdate()
        {
            var context = MockContextFactory.Create();

            var testTable1 = new Database.Models.Table
            {
                Id   = 9,
                Name = "Zuki"
            };

            context.Table.Add(testTable1);
            context.SaveChanges();

            var service = new TableService(new MockDataService(context));
            var result  = service.GetAllTables();

            Assert.Equal("Zuki", result.ElementAt(0).Name);

            testTable1.Name = "Harri";
            context.Table.Update(testTable1);
            context.SaveChanges();

            Assert.False(result.ElementAt(0).Name == "Zuki");
        }
        public void TestAddOrderPos()
        {
            var context = MockContextFactory.Create();

            var testOrder = new Order()
            {
                Id           = 1,
                OrderStatus  = OrderStatus.New,
                CreationTime = new DateTime(2017, 2, 4, 17, 0, 0),
                Guests       = new List <Tablet>(),
                Positions    = new List <OrderPos>()
            };

            var testItem1 = new Itemtyp
            {
                Id          = 1,
                Number      = 1,
                Title       = "Burger",
                Description = "Burger with Fries",
                ItemPrice   = 15
            };

            var testItem2 = new Itemtyp
            {
                Id          = 2,
                Number      = 2,
                Title       = "Steak",
                Description = "Steak with Fries",
                ItemPrice   = 20
            };

            var testItem3 = new Itemtyp
            {
                Id          = 3,
                Number      = 3,
                Title       = "Toast",
                Description = "Toast with Fries",
                ItemPrice   = 10
            };

            context.Order.Add(testOrder);
            context.SaveChanges();

            var orderService = new OrderService(new MockDataService(context));
            var service      = new OrderPosService(new MockDataService(context), orderService);

            service.AddOrderPos(testOrder.Id, testItem1.Id);
            service.AddOrderPos(testOrder.Id, testItem2.Id);
            context.SaveChanges();

            Assert.Equal(2, testOrder.Positions.Count());
            Assert.Equal(2, testOrder.Positions.LastOrDefault().Number);

            var testOrder2 = new Order()
            {
                Id           = 2,
                OrderStatus  = OrderStatus.New,
                CreationTime = new DateTime(2017, 2, 9, 17, 0, 0),
                Guests       = new List <Tablet>(),
                Positions    = new List <OrderPos>()
            };

            context.Order.Add(testOrder2);
            context.SaveChanges();

            service.AddOrderPos(testOrder2.Id, testItem1.Id);
            service.AddOrderPos(testOrder2.Id, testItem2.Id);
            service.AddOrderPos(testOrder2.Id, testItem3.Id);
            context.SaveChanges();

            Assert.Equal(3, testOrder2.Positions.Count());
            Assert.Equal(3, testOrder2.Positions.LastOrDefault().Number);

            service.RemoveOrderPos(testOrder2.Id, testOrder2.Positions.First().Id);

            Assert.Equal(2, testOrder2.Positions.Count());
            Assert.Equal(3, testOrder2.Positions.LastOrDefault().Number);
        }
Beispiel #24
0
        public void TestDoCalculateOrderPrice()
        {
            var context = MockContextFactory.Create();

            var waiter = new Tablet()
            {
                Id         = 4,
                Identifier = "brutus",
                Mode       = Mode.Waiter
            };

            var order1 = new Order
            {
                Id          = 4,
                OrderStatus = OrderStatus.New,
                PriceOrder  = 0,
                TableId     = 5,
                Waiter      = waiter
            };

            var order2 = new Order
            {
                Id          = 8,
                OrderStatus = OrderStatus.Active,
                PriceOrder  = 0,
                TableId     = 7,
                Waiter      = waiter
            };

            var itemA = new Itemtyp
            {
                Id          = 1,
                Number      = 1,
                Title       = "soup",
                Description = "tomatosoup",
                ItemPrice   = 9
            };

            var itemB = new Itemtyp
            {
                Id          = 2,
                Number      = 2,
                Title       = "salad",
                Description = "tomatosalad",
                ItemPrice   = 12
            };

            var positionSoup = new OrderPos
            {
                Amount              = 1,
                Id                  = 6,
                Order               = order2,
                OrderId             = order2.Id,
                PricePos            = 9,
                PricePaidByCustomer = 9,
                Itemtyp             = itemA,
                ItemtypId           = itemA.Id,
                PosStatus           = PosStatus.Active
            };

            var positionSalad = new OrderPos
            {
                Amount              = 1,
                Id                  = 8,
                Order               = order2,
                OrderId             = order2.Id,
                PricePos            = 12,
                PricePaidByCustomer = 12,
                Itemtyp             = itemA,
                ItemtypId           = itemA.Id,
                PosStatus           = PosStatus.Active
            };

            context.Tablet.Add(waiter);
            context.Order.Add(order1);
            context.Order.Add(order2);
            context.Itemtyp.Add(itemA);
            context.Itemtyp.Add(itemB);
            context.OrderPos.Add(positionSoup);
            context.OrderPos.Add(positionSalad);
            context.SaveChanges();


            var orderService = new OrderService(new MockDataService(context));

            orderService.DoCalulateOrderPrice(4);
            orderService.DoCalulateOrderPrice(8);

            context.SaveChanges();

            Assert.Equal(0, order1.PriceOrder);
            Assert.Equal(21, order2.PriceOrder);
        }