protected virtual void OnCreateProcessUsingExistingAccounts(IProcessDefinitionPersisnenceService service) { var processDefinition = BuildProcessdefinition(); Assert.IsNotNull(processDefinition); AccountData[] accounts = new[] { new AccountData { AccountType = 1, Id = Guid.NewGuid(), Name = "Underwriters", SourceSystem = "ActiveDirectory" }, new AccountData { AccountType = 1, Id = Guid.NewGuid(), Name = "Modeler", SourceSystem = "ActiveDirectory" }, }; service.CreateAccounts(accounts); service.Create(processDefinition, ProcessDefStatusEnum.Active, 1, accounts); ProcessDefStatusEnum status; AccountData[] pdAccounts; Assert.IsTrue(service.TryFind(processDefinition.Id, 1, out processDefinition, out status, out pdAccounts)); Assert.IsNotNull(pdAccounts); Assert.AreEqual(2, pdAccounts.Length); Assert.IsNotNull(pdAccounts.FirstOrDefault(d => d.Id == accounts[0].Id)); Assert.IsNotNull(pdAccounts.FirstOrDefault(d => d.Id == accounts[1].Id)); }