public void ApplyConfiguration() { var activityMonitor = new ActivityMonitor(); var tcpHandlerConfiguration = new TcpHandlerConfiguration(); var tcpHandler = new TcpHandler(tcpHandlerConfiguration); // ApplyConfiguration should always return false for now. Need to think about its implication before implementing. tcpHandler.ApplyConfiguration(activityMonitor, tcpHandlerConfiguration).Should().BeFalse(); }
/// <summary> /// Returns a new Grand Output Client. /// It contains a <see cref="TextFileConfiguration"/> and also a <see cref="TcpHandlerConfiguration"/>. /// The tcp handler will use <see cref="TestHelper.DefaultHost"/> and <see cref="TestHelper.DefaultPort"/> from <see cref="TestHelper"/>. /// </summary> /// <returns></returns> internal static GrandOutput GetNewGrandOutputClient() { var textFileConfiguration = new TextFileConfiguration { MaxCountPerFile = 10000, Path = "Text", }; var tcpHandlerConfiguration = new TcpHandlerConfiguration { Host = TestHelper.DefaultHost, Port = TestHelper.DefaultPort, IsSecure = false, AppName = typeof(TestHelper).GetTypeInfo().Assembly.GetName().Name, PresentEnvironmentVariables = true, PresentMonitoringAssemblyInformation = true, HandleSystemActivityMonitorErrors = true }; return(new GrandOutput(new GrandOutputConfiguration { Handlers = { textFileConfiguration, tcpHandlerConfiguration } })); }