/// <summary>
 ///
 /// </summary>
 /// <param name="organization"></param>
 /// <param name="cancellationToken"></param>
 /// <returns></returns>
 public Task AddEquipmentAsync(EquipmentAggregate equipmentAggregate, CancellationToken cancellationToken = default(CancellationToken))
 {
     cancellationToken.ThrowIfCancellationRequested();
     if (equipmentAggregate == (EquipmentAggregate)null)
     {
         throw new ArgumentNullException("equipmentAggregate");
     }
     _equipmentAggregateRepository.Add(equipmentAggregate);
     return(Task.Run(() =>
     {
         _equipmentAggregateRepository.UnitOfWork.Commit();
     }));
 }
        public void EquipmentAggregateRepositoty_AddTest()
        {
            IEquipmentAggregateRepository repo      = IoCFactory.Instance.CurrentContainer.Resolve <IEquipmentAggregateRepository>();
            EquipmentAggregate            equipment = new EquipmentAggregate()
            {
                Id             = Guid.NewGuid(),
                DepartmentId   = Guid.NewGuid(),
                DepartmentName = "test facility",
                Model          = "Type of equipment",
                Name           = "test equipment"
            };

            repo.Add(equipment);
            repo.UnitOfWork.Commit();
            var all = repo.GetAllElements();

            Assert.IsNotNull(all);
            Assert.IsTrue(all.Count() > 1);
        }