public void ThatBrandCanBeFoundWhenCreated() { var brand = BrandServices.WithDto(BrandTestFixtures.GetDto()).Get(); Assert.AreEqual(brand, BrandServices.Brands.Single(b => b.Name == brand.Name)); }
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); }
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); }
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); }
public NavBarViewComponent(BrandServices brandServices) { _brandServices = brandServices; }
public HomeController(ILogger <HomeController> logger, ShoeServices shoeService, BrandServices brandServices) { _logger = logger; _shoesService = shoeService; }
public BrandController(BrandServices brandServices, ApplicationDbContext context) { BrandServices = brandServices; Context = context; }
public FormMarka() { InitializeComponent(); brandServices = new BrandServices(); }
public BrandController(BrandServices brandsService) { _brandService = brandsService; }
public ModelController() { unitOfWork = new UnitOfWork(); ModelServices = new ModelServices(unitOfWork); BrandServices = new BrandServices(unitOfWork); }
public void ThatBrandHasAnId() { var brand = BrandServices.WithDto(BrandTestFixtures.GetDto()).Get(); Assert.IsTrue(brand.Id != Guid.Empty); }
public void ThatABrandCanBeGet() { var brand = BrandServices.WithDto(BrandTestFixtures.GetDto()).Get(); Assert.IsNotNull(brand); }
public void ThatBrandWithNoProductsHasEmptyProductList() { var brand = BrandServices.WithDto(BrandTestFixtures.GetDto()).Get(); Assert.AreEqual(0, brand.Products.Count()); }
public AdminController(BrandServices brandServices, ShoeServices shoesService) { _brandServices = brandServices; _shoesService = shoesService; }
public void ThatBrandCanBeFoundByName() { var brand = BrandServices.WithDto(BrandTestFixtures.GetDto()).Get(); Assert.AreEqual(brand, BrandServices.GetByName(brand.Name)); }
public BrandController(BrandServices service) { this._brandServices = service; }