public void InitiateSync_OnValidCall_ConfirmResult() { // Arrange string processLog; bool hasErrors; _privateObj.SetFieldOrProperty(HasSIDProperty, true); // Act _testObj.InitiateSync(_site.Instance, out processLog, out hasErrors, Guid.NewGuid()); // Assert this.ShouldSatisfyAllConditions( () => _fieldAdded.ShouldBeTrue(), () => _listItemUpdated.ShouldBeTrue(), () => _listItemDeleted.ShouldBeTrue(), () => _listUpdated.ShouldBeTrue(), () => _deRefreshCacheCalled.ShouldBeTrue(), () => _daoDisposed.ShouldBeTrue(), () => processLog.ShouldContain("AD Sync process started at:"), () => processLog.ShouldContain("AD Sync process finished at:"), () => hasErrors.ShouldBeFalse()); }
public void execute(SPSite osite, SPWeb oweb, string data) { try { ADSync synch = new ADSync(); synch.InitiateSync(osite, out sErrors, out bErrors, base.JobUid); } catch (Exception ex) { throw ex; } finally { if (oweb != null) { oweb.Dispose(); } if (osite != null) { osite.Dispose(); } data = null; } }