Ejemplo n.º 1
0
        public void ThatBrandCanBeFoundWhenCreated()
        {
            var brand = BrandServices.WithDto(BrandTestFixtures.GetDto()).Get();

            Assert.AreEqual(brand,
                            BrandServices.Brands.Single(b => b.Name == brand.Name));
        }
Ejemplo n.º 2
0
 public ProductController(ShoeServices shoeServices, BrandServices brandServices,
                          QuantityService quantityService)
 {
     _shoesService    = shoeServices;
     _brandServices   = brandServices;
     _quantityService = quantityService;
 }
 public BrandController()
 {
     unitOfWork    = new UnitOfWork();
     BrandServices = new BrandServices(unitOfWork);
     SubSubSubSubCategoryServices = new SubSubSubSubCategoryServices(unitOfWork);
     SubSubSubCategoryServices    = new SubSubSubCategoryServices(unitOfWork);
     SubSubCategoryServices       = new SubSubCategoryServices(unitOfWork);
     SubCategoryServices          = new SubCategoryServices(unitOfWork);
     CategoryServices             = new CategoryServices(unitOfWork);
 }
Ejemplo n.º 4
0
        public void ThatBrandCanBeDeleted()
        {
            var brand = BrandServices.WithDto(BrandTestFixtures.GetDto()).Get();

            Assert.AreEqual(brand,
                            BrandServices.Brands.Single(b => b.Name == brand.Name));
            BrandServices.Delete(brand);
            brand = BrandServices.Brands.FirstOrDefault(b => b.Name == BrandTestFixtures.GetDto().Name);
            Assert.IsNull(brand);
        }
Ejemplo n.º 5
0
        public void ThatVersionDoesNotChangedAfterOnlyAReadAction()
        {
            var services = BrandServices.WithDto(BrandTestFixtures.GetDto()).Get();

            Assert.AreEqual(1, services.Version);
            Context.CurrentSession().Transaction.Commit();
            Context.CurrentSession().Transaction.Begin();
            var brand = BrandServices.Brands.Single(x => x.Name == BrandTestFixtures.GetDto().Name);

            Assert.AreEqual(1, brand.Version);
        }
Ejemplo n.º 6
0
        public void ThatBrandCanBeUpdated()
        {
            var brand = BrandServices.WithDto(BrandTestFixtures.GetDto()).Get();

            BrandServices.ChangeBrandName(brand, "changedName");
            Context.CurrentSession().Transaction.Commit();

            Context.CurrentSession().Transaction.Begin();
            brand = BrandServices.Brands.FirstOrDefault(b => b.Name == BrandTestFixtures.GetDto().Name);
            Assert.IsNull(brand);
        }
 public ProcurementController()
 {
     UnitOfWork                   = new UnitOfWork();
     ProcurementServices          = new ProcurementServices(UnitOfWork);
     ProcrurementTypeServices     = new ProcrurementTypeServices(UnitOfWork);
     SupplierCompanyServices      = new SupplierCompanyServices(UnitOfWork);
     SubSubSubSubCategoryServices = new SubSubSubSubCategoryServices(UnitOfWork);
     SubSubSubCategoryServices    = new SubSubSubCategoryServices(UnitOfWork);
     SubSubCategoryServices       = new SubSubCategoryServices(UnitOfWork);
     SubCategoryServices          = new SubCategoryServices(UnitOfWork);
     CategoryServices             = new CategoryServices(UnitOfWork);
     ItemServices                 = new ItemServices(UnitOfWork);
     ModelServices                = new ModelServices(UnitOfWork);
     BrandServices                = new BrandServices(UnitOfWork);
     UnitServices                 = new UnitServices(UnitOfWork);
 }
Ejemplo n.º 8
0
 public ItemController()
 {
     unitOfWork                   = new UnitOfWork();
     itemServices                 = new ItemServices(unitOfWork);
     categoryServices             = new CategoryServices(unitOfWork);
     subCategoryServices          = new SubCategoryServices(unitOfWork);
     subSubCategoryServices       = new SubSubCategoryServices(unitOfWork);
     subSubSubCategoryServices    = new SubSubSubCategoryServices(unitOfWork);
     subSubSubSubCategoryServices = new SubSubSubSubCategoryServices(unitOfWork);
     companyServices              = new CompanyServices(unitOfWork);
     unitServices                 = new UnitServices(unitOfWork);
     storeServices                = new StoreServices(unitOfWork);
     subStoreServices             = new SubStoreServices(unitOfWork);
     subSubStoreServices          = new SubSubStoreServices(unitOfWork);
     subSubSubStoreServices       = new SubSubSubStoreServices(unitOfWork);
     subSubSubSubStoreServices    = new SubSubSubSubStoreServices(unitOfWork);
     BrandServices                = new BrandServices(unitOfWork);
     ModelServices                = new ModelServices(unitOfWork);
 }
Ejemplo n.º 9
0
 public NavBarViewComponent(BrandServices brandServices)
 {
     _brandServices = brandServices;
 }
Ejemplo n.º 10
0
 public HomeController(ILogger <HomeController> logger, ShoeServices shoeService, BrandServices brandServices)
 {
     _logger       = logger;
     _shoesService = shoeService;
 }
Ejemplo n.º 11
0
 public BrandController(BrandServices brandServices, ApplicationDbContext context)
 {
     BrandServices = brandServices;
     Context       = context;
 }
Ejemplo n.º 12
0
 public FormMarka()
 {
     InitializeComponent();
     brandServices = new BrandServices();
 }
Ejemplo n.º 13
0
 public BrandController(BrandServices brandsService)
 {
     _brandService = brandsService;
 }
Ejemplo n.º 14
0
 public ModelController()
 {
     unitOfWork    = new UnitOfWork();
     ModelServices = new ModelServices(unitOfWork);
     BrandServices = new BrandServices(unitOfWork);
 }
Ejemplo n.º 15
0
        public void ThatBrandHasAnId()
        {
            var brand = BrandServices.WithDto(BrandTestFixtures.GetDto()).Get();

            Assert.IsTrue(brand.Id != Guid.Empty);
        }
Ejemplo n.º 16
0
        public void ThatABrandCanBeGet()
        {
            var brand = BrandServices.WithDto(BrandTestFixtures.GetDto()).Get();

            Assert.IsNotNull(brand);
        }
Ejemplo n.º 17
0
        public void ThatBrandWithNoProductsHasEmptyProductList()
        {
            var brand = BrandServices.WithDto(BrandTestFixtures.GetDto()).Get();

            Assert.AreEqual(0, brand.Products.Count());
        }
Ejemplo n.º 18
0
 public AdminController(BrandServices brandServices, ShoeServices shoesService)
 {
     _brandServices = brandServices;
     _shoesService  = shoesService;
 }
Ejemplo n.º 19
0
        public void ThatBrandCanBeFoundByName()
        {
            var brand = BrandServices.WithDto(BrandTestFixtures.GetDto()).Get();

            Assert.AreEqual(brand, BrandServices.GetByName(brand.Name));
        }
 public BrandController(BrandServices service)
 {
     this._brandServices = service;
 }