public void CanSetOutput() { var written = string.Empty; var output = new Action <string>(s => written = s); var config = new BootConfiguration(); config.WithOutput(output); config.Output("hello"); Assert.Equal("hello", written); }
public void RegistersCommandsFromBootConfiguration() { var kernel = new Kernel(); var configuration = new BootConfiguration(AssemblyCollectionMockBuilder.GetWithEasyCommand()); configuration.WithOutput(this.output.WriteLine); configuration.Seal(); kernel.Boot(configuration); var registry = kernel.ServiceLocator.GetService <ICommandRegistry>(); Assert.True(registry.IsRegistered("Test")); }