Beispiel #1
0
        public void ThatBrandCanBeFoundWhenCreated()
        {
            var brand = BrandServices.WithDto(BrandTestFixtures.GetDto()).Get();

            Assert.AreEqual(brand,
                            BrandServices.Brands.Single(b => b.Name == brand.Name));
        }
Beispiel #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);
 }
Beispiel #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);
        }
        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);
        }
Beispiel #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);
 }
 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);
 }
Beispiel #9
0
 public NavBarViewComponent(BrandServices brandServices)
 {
     _brandServices = brandServices;
 }
Beispiel #10
0
 public HomeController(ILogger <HomeController> logger, ShoeServices shoeService, BrandServices brandServices)
 {
     _logger       = logger;
     _shoesService = shoeService;
 }
Beispiel #11
0
 public BrandController(BrandServices brandServices, ApplicationDbContext context)
 {
     BrandServices = brandServices;
     Context       = context;
 }
Beispiel #12
0
 public FormMarka()
 {
     InitializeComponent();
     brandServices = new BrandServices();
 }
Beispiel #13
0
 public BrandController(BrandServices brandsService)
 {
     _brandService = brandsService;
 }
Beispiel #14
0
 public ModelController()
 {
     unitOfWork    = new UnitOfWork();
     ModelServices = new ModelServices(unitOfWork);
     BrandServices = new BrandServices(unitOfWork);
 }
Beispiel #15
0
        public void ThatBrandHasAnId()
        {
            var brand = BrandServices.WithDto(BrandTestFixtures.GetDto()).Get();

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

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

            Assert.AreEqual(0, brand.Products.Count());
        }
Beispiel #18
0
 public AdminController(BrandServices brandServices, ShoeServices shoesService)
 {
     _brandServices = brandServices;
     _shoesService  = shoesService;
 }
Beispiel #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;
 }