public OrdersListViewModelTests() { var fixture = new OmitRecursionFixture(); _orders = fixture.CreateMany <Order>(); _ordersListViewModel = new OrdersListViewModel(); }
public OrderTests() { var fixture = new OmitRecursionFixture(); _orderDetails = fixture.CreateMany <OrderDetail>().ToList(); _customer = fixture.Create <Customer>(); _orderPlaced = fixture.Create <DateTime>(); _order = new Order(); }
public CategoryTests() { _category = new Category(); var fixture = new OmitRecursionFixture(); _shopItems = fixture.CreateMany <ShopItem>().ToList(); fixture.Freeze <Category>(); _categoryLeft = fixture.Create <Category>(); _categoryRight = fixture.Create <Category>(); }
public void TestCreateShouldReturnOrdersListViewModel() { //Arrange const int testPageSize = 2; const int testPageIndex = 1; var fixture = new OmitRecursionFixture(); var orders = fixture.CreateMany <Order>().ToList(); var sut = new OrdersListViewModelFactory(); //Act var result = sut.Create(orders, testPageSize, testPageIndex); //Assert Assert.Equal(testPageSize, result.PageSize); Assert.Equal(testPageIndex, result.PageIndex); Assert.Equal(orders.Take(2), result.Orders); }