Пример #1
0
        protected override void Given()
        {
            base.Given();

            var order = OrderMother.Simple();
            var model = new OrderItem
            {
                Order     = order,
                Price     = 1.00m,
                ProductId = 1
            };

            _model = SUT.AddAsync(AdminUserId, model).Result;
            Assert.IsNotNull(SUT.GetAsync(AdminUserId, _model.Id).Result);
        }
        protected override void Given()
        {
            base.Given();

            var order = OrderMother.Simple();

            _model = new OrderItem
            {
                Order     = order,
                Price     = 1.00m,
                ProductId = 1
            };

            order.OrderItems.Add(_model);
        }
Пример #3
0
        protected override void Given()
        {
            base.Given();

            var order = OrderMother.Simple();

            _models = new List <OrderItem>
            {
                new OrderItem
                {
                    Order     = order,
                    Price     = 1.00m,
                    ProductId = 1
                },
                new OrderItem
                {
                    Order     = order,
                    Price     = 2.00m,
                    ProductId = 2
                }
            };

            _originalCount = SUT.CountAsync().Result;
        }