Beispiel #1
0
        public void CanHandleOrgProcessingAndCancel()
        {
            OrgsHandler.CheckAvailableOrgs(null);
            Thread.Sleep(TimeSpan.FromSeconds(2));

            //   OrgsHandler.OrgProcessingTasks.ForEach(t => t.Item3.Cancel());
        }
Beispiel #2
0
 public void CanAddMoreOrgsToExisting()
 {
     OrgsHandler.CheckAvailableOrgs(null);
     //Add here more orgs here
     //And make sure that they are merged
     OrgsHandler.CheckAvailableOrgs(null);
     Assert.AreEqual(MockFileRepository.OrgIncrement * 2, OrgsHandler.OrgProcessingTasks.Count);
 }
Beispiel #3
0
        public void CanRemoveAbsentOrgs()
        {
            OrgsHandler.CheckAvailableOrgs(null);
            //Save here two items from the list of created tasks
            var org1 = OrgsHandler.OrgProcessingTasks.First().Value;
            var org2 = OrgsHandler.OrgProcessingTasks.Last().Value;

            //Remove these orgs from the list of orgs
            respositoryInstance.DeleteOrgs(new Organization[] { org1.Item1, org2.Item1 });
            OrgsHandler.CheckAvailableOrgs(null);
            Assert.AreEqual(MockFileRepository.OrgIncrement * 2 - 2, OrgsHandler.OrgProcessingTasks.Count);
        }
Beispiel #4
0
 public void CanAddNewlyFoundOrgs()
 {
     OrgsHandler.CheckAvailableOrgs(null);
     Assert.AreEqual(MockFileRepository.OrgIncrement, OrgsHandler.OrgProcessingTasks.Count);
 }