public void DepartmentAggregateRepositoryTests_GetAllTest() { IDepartmentAggregateRepository repo = IoCFactory.Instance.CurrentContainer.Resolve <IDepartmentAggregateRepository>(); IQueryable <DepartmentAggregate> all = repo.GetAllElements(); Assert.IsNotNull(all); Assert.IsTrue(all.Any()); }
public DepartmentAggregateManagementService(IDepartmentAggregateRepository departmentAggregateRepository, ILogger logger) { if (departmentAggregateRepository == (IDepartmentAggregateRepository)null) throw new ArgumentNullException("departmentAggregateRepository"); if (logger == (ILogger)null) throw new ArgumentNullException("logger"); this._departmentAggregateRepository = departmentAggregateRepository; this._logger = logger; }
public void DepartmentAggregateRepository_GetByIdValidIdTest() { Guid guid = new Guid("62588897-8e83-cf15-3239-08d20141829a"); IDepartmentAggregateRepository repo = IoCFactory.Instance.CurrentContainer.Resolve <IDepartmentAggregateRepository>(); DepartmentAggregate dep = repo.GetElementById(guid); Assert.IsNotNull(dep); Assert.IsTrue(dep.Id == guid); }
public DepartmentAggregateManagementService(IDepartmentAggregateRepository departmentAggregateRepository, ILogger logger) { if (departmentAggregateRepository == (IDepartmentAggregateRepository)null) { throw new ArgumentNullException("departmentAggregateRepository"); } if (logger == (ILogger)null) { throw new ArgumentNullException("logger"); } this._departmentAggregateRepository = departmentAggregateRepository; this._logger = logger; }