private void OnConfigurationChanged(ConfigurationChangedMasterCommand command) { Trace.WriteLine("ENTER: Task processor '{0}' configuration changed ...".FormatInvariant(command.TaskProcessorId)); this.AssignTasksToProcessor(command.TaskProcessorId); Trace.WriteLine("EXIT: Task processor '{0}' configuration changed.".FormatInvariant(command.TaskProcessorId)); }
public void PopMasterCommandsQueue() { this.MessageBus.Provider.FlushAll(); Guid taskProcessorId = Guid.NewGuid(); ConfigurationChangedMasterCommand command1 = new ConfigurationChangedMasterCommand(taskProcessorId); this.MessageBus.MasterCommands.Add(command1); IUniqueMessage command2 = this.MessageBus.MasterCommands.PopFirst(); Assert.IsNotNull(command2); Assert.IsInstanceOfType(command2, typeof(ConfigurationChangedMasterCommand)); Assert.AreEqual(taskProcessorId, ((ConfigurationChangedMasterCommand)command2).TaskProcessorId); }