public IventoryControllerTests()
        {
            _runner = MongoDbRunner.Start();

            var client   = new MongoClient(_runner.ConnectionString);
            var database = client.GetDatabase("IntegrationTest");

            _materialDispositionContext = new DispositionContext(database);
            _inventoryService           = new MaterialInventoryService(_materialDispositionContext);
            _sut = new InventoryController(_inventoryService);
        }
Exemple #2
0
        public CompaniesControllerTests()
        {
            _runner = MongoDbRunner.Start();

            var client             = new MongoClient(_runner.ConnectionString);
            var database           = client.GetDatabase("IntegrationTest");
            var dispositionContext = new DispositionContext(database);

            _materialDispositionContext = dispositionContext;
            _servantDispositionContext  = dispositionContext;
            var inventoryService        = new MaterialInventoryService(_materialDispositionContext);
            var servantInventoryService = new ServantInventoryService(_servantDispositionContext);

            var companyTemplateGenerator  = new CompanyTemplateGenerator(_materialDispositionContext);
            var companyInventoryGenerator = new CompanyInventoryGenerator(_materialDispositionContext);

            _sut = new CompaniesController(_materialDispositionContext, inventoryService, servantInventoryService, _servantDispositionContext, companyTemplateGenerator, companyInventoryGenerator);
        }