public DownloaderTests(ITestOutputHelper helper) : base(helper) { Helpers.Init(); _unsubMsgs = Utils.LogMessages.OfType <IInfo>().Subscribe(onNext: msg => XunitContext.WriteLine(msg.ShortDescription)); _unsubErr = Utils.LogMessages.OfType <IUserIntervention>().Subscribe(msg => XunitContext.WriteLine("ERROR: User intervention required: " + msg.ShortDescription)); }
public Task Write_lines() { XunitContext.Write("part1"); XunitContext.Write(" part2"); XunitContext.WriteLine(); XunitContext.WriteLine("part3"); var logs = XunitContext.Flush(false); return(Verifier.Verify(logs)); }
public override void WriteLine(string value) { if (value == null) { XunitContext.WriteLine(); } else { XunitContext.WriteLine(value); } }
public EndToEndTests(ITestOutputHelper helper) : base(helper) { Queue = new WorkQueue(); Consts.TestMode = true; utils = new TestUtils(); utils.Game = Game.SkyrimSpecialEdition; _unsub = Utils.LogMessages.Subscribe(f => XunitContext.WriteLine($"{DateTime.Now} - {f}")); _downloadFolder.CreateDirectory(); }
public ACompilerTest(ITestOutputHelper helper) : base(helper) { Helpers.Init(); Consts.TestMode = true; utils = new TestUtils(); utils.Game = Game.SkyrimSpecialEdition; DateTime startTime = DateTime.Now; _unsub = Utils.LogMessages.Subscribe(f => XunitContext.WriteLine($"{DateTime.Now - startTime} - {f.ShortDescription}")); }
public async Task Async() { await Task.Delay(1); XunitContext.WriteLine("part1"); await Task.Delay(1); XunitContext.WriteLine("part2"); await Task.Delay(1); var logs = XunitContext.Flush(false); await Verifier.Verify(logs); }
private static void CheckResponse(AuthenticationResponse response) { if (!response.IsAuthenticated) { if (response.ResponseCode == "KS-E500") { XunitContext.WriteLine("SERVER ERROR"); } XunitContext.WriteLine($"{response.ResponseCode}:{response.ResponseMessage}"); string logs = string.Concat(XunitContext.Logs.Select(x => x)); Assert.True(response.IsAuthenticated, logs); } }
public void Usage() { XunitContext.WriteLine("From Test"); ClassBeingTested.Method(); var logs = XunitContext.Logs; Assert.Contains("From Test", logs); Assert.Contains("From Trace", logs); Assert.Contains("From Debug", logs); Assert.Contains("From Console", logs); Assert.Contains("From Console Error", logs); }
public ABuildServerSystemTest(ITestOutputHelper output, SingletonAdaptor <BuildServerFixture> fixture) : base(output) { Filters.Clear(); _unsubMsgs = Utils.LogMessages.OfType <IInfo>().Subscribe(onNext: msg => XunitContext.WriteLine(msg.ShortDescription)); _unsubErr = Utils.LogMessages.OfType <IUserIntervention>().Subscribe(msg => XunitContext.WriteLine("ERROR: User intervention required: " + msg.ShortDescription)); _client = new Client(); _authedClient = new Client(); Fixture = fixture.Deref(); _authedClient.Headers.Add(("x-api-key", Fixture.APIKey)); AuthorAPI.ApiKeyOverride = Fixture.APIKey; _queue = new WorkQueue(); Queue = new WorkQueue(); _random = new Random(); Consts.ModlistSummaryURL = MakeURL("lists/status.json"); Consts.ServerWhitelistURL = MakeURL("ServerWhitelist.yaml"); }
public Task Null() { XunitContext.WriteLine("XunitLogger.WriteLine"); XunitContext.WriteLine(); XunitContext.WriteLine("Console.WriteLine(null)"); #pragma warning disable CS8600 // Converting null literal or possible null value to non-nullable type. Console.WriteLine((string)null); #pragma warning restore CS8600 // Converting null literal or possible null value to non-nullable type. XunitContext.WriteLine("Debug.WriteLine(null)"); Debug.WriteLine(null); XunitContext.WriteLine("Debug.Write(null)"); Debug.Write(null); XunitContext.WriteLine("Trace.WriteLine(null)"); Trace.WriteLine(null); XunitContext.WriteLine("Trace.Write(null)"); Trace.Write(null); var logs = XunitContext.Flush(false); return(Verifier.Verify(logs)); }
protected ATestBase(ITestOutputHelper output) : base(output) { _unsub = Utils.LogMessages.Subscribe(f => XunitContext.WriteLine($"{DateTime.Now} - {f}")); }
public override void WriteLine() { XunitContext.WriteLine(); }