public void CommitTransaction_Executed_ExecutesWithNoException() { var roleRepository = Substitute.For <IRoleRepository>(); var userRepository = Substitute.For <IUserRepository>(); var functionRepository = Substitute.For <IFunctionRepository>(); var teamRepository = Substitute.For <ITeamRepository>(); var applicationRepository = Substitute.For <IApplicationRepository>(); var applicationDataPolicyRepository = Substitute.For <IApplicationDataPolicyRepository>(); var ldapAuthenticationModeRepository = Substitute.For <ILdapAuthenticationModeRepository>(); securityContractDefaultConfigurationService = new SecurityContractDefaultConfigurationService(roleRepository, userRepository, functionRepository, teamRepository, applicationRepository, applicationDataPolicyRepository, ldapAuthenticationModeRepository); Exception caughtException = null; try { securityContractDefaultConfigurationService.CommitTransaction(); } catch (Exception ex) { caughtException = ex; } Assert.True(caughtException == null, "CommitTransaction must not throw an exception."); }
private void CommitAllTransactions() { securityContractApplicationService.CommitTransaction(); securityContractDefaultConfigurationService.CommitTransaction(); clientService.CommitTransaction(); }