Пример #1
0
        public async Task EquipmentAggregateManagementServiceTests_GetAllTests()
        {
            IEquipmentAggregateManagementService service = IoCFactory.Instance.CurrentContainer.Resolve <IEquipmentAggregateManagementService>();
            IEnumerable <EquipmentAggregate>     orgs    = await service.GetAllEquipmentAsync();

            Assert.IsNotNull(orgs);
            Assert.IsTrue(orgs.Count() > 0);
        }
        public EquipmentController(IEquipmentAggregateManagementService equipmentAggregateManagementService, IDepartmentAggregateManagementService departmentAggregateManagementService)
        {
            if (equipmentAggregateManagementService == (IEquipmentAggregateManagementService)null)
                throw new ArgumentNullException("organizationManagementService");
            if (departmentAggregateManagementService == (IDepartmentAggregateManagementService)null)
                throw new ArgumentNullException("departmentAggregateManagementService");
            _equipmentAggregateManagementService = equipmentAggregateManagementService;
            _departmentAggregateManagementService = departmentAggregateManagementService;


        }
 public EquipmentController(IEquipmentAggregateManagementService equipmentAggregateManagementService, IDepartmentAggregateManagementService departmentAggregateManagementService)
 {
     if (equipmentAggregateManagementService == (IEquipmentAggregateManagementService)null)
     {
         throw new ArgumentNullException("organizationManagementService");
     }
     if (departmentAggregateManagementService == (IDepartmentAggregateManagementService)null)
     {
         throw new ArgumentNullException("departmentAggregateManagementService");
     }
     _equipmentAggregateManagementService  = equipmentAggregateManagementService;
     _departmentAggregateManagementService = departmentAggregateManagementService;
 }