public void GetNumberOfRequestsGroupedByNameForSpecificClient_OrdersExistInDatabase_GrouppedRequestsAreReturned() { //Arrange var viewModel = new OrderViewModel(); var ordersToAdd = OrderCreator.CreateOrdersForGroupByNameTest(); viewModel.AddNewOrders(ordersToAdd); var groupedOrdersForClient = viewModel.GetNumberOfOrdersGroupedByNameForSpecificClient("id1"); // Assert // Only 2 orders should be returned because two orders referee to same name Assert.AreEqual(2, groupedOrdersForClient.Count); }
public void GetNumberOfRequestsGroupedByName_OrdersExistInDatabase_GrouppedRequestsAreReturned() { //Arrange var viewModel = new OrderViewModel(); var ordersToAdd = OrderCreator.CreateOrdersForGroupByNameTest(); viewModel.AddNewOrders(ordersToAdd); //Action var groupedOrders = viewModel.GetNumberOfOrdersGroupedByName(); //Assert // only 3 orders should be returned because two orders referee to same name Assert.AreEqual(3, groupedOrders.Count); }