Esempio n. 1
0
        public override void ShouldRegister()
        {
            using var context = ContextFixture.Ctx;
            InitializeDataBase(context);
            var customer   = _customerPrototype.GetValidEntity();
            var product    = _productPrototype.GetValidEntity();
            var order      = _orderPrototype.GetValidEntity(product, customer);
            var repository = new OrderRepository(context, MapperFixture.Mapper);

            repository.Register(order);

            context.Orders.Should().ContainSingle();
        }