// Called by tests. The messageProvider must be initialized. internal static void StartTheSystem(ISecurityDataProvider securityDataProvider, IMessageProvider messageProvider, TextWriter traceChannel = null) { // Timestamp of the starting. var startingThesystem = DateTime.UtcNow; // Call SecurityContext starter method. TestSecurityContext.StartTheSystem(new SecurityConfiguration { SecurityDataProvider = securityDataProvider, MessageProvider = messageProvider, CommunicationMonitorRunningPeriodInSeconds = 31, }); // Staring message system. Messages before 'startingThesystem' will be ignored. messageProvider.Start(startingThesystem); }
public Context(ISecurityUser currentUser) { // Create a new instance. Security = new TestSecurityContext(currentUser); }
public static new void StartTheSystem(SecurityConfiguration configuration) { SecurityContext.StartTheSystem(configuration); _generalContext = new TestSecurityContext(SystemUser); }