private ServiceRunnerOptions GetOptions() { var options = ServiceTestRunner.GetDefaultOptions(); var assembly = typeof(RestfulTest).Assembly; options.ConfigStream = assembly.GetManifestResourceStream( "TPPCore.Service.Emotes.Tests.test_files.emote_config.json"); Assert.NotNull(options.ConfigStream); return(options); }
private ServiceRunnerOptions GetOptions() { var options = ServiceTestRunner.GetDefaultOptions(); var assembly = typeof(RestfulTest).Assembly; output.WriteLine(assembly.GetManifestResourceNames().Length.ToString()); output.WriteLine(string.Join(", ", assembly.GetManifestResourceNames())); options.ConfigStream = assembly.GetManifestResourceStream( "TPPCore.Service.Example.Parrot.Tests.test_files.database_config.json"); Assert.NotNull(options.ConfigStream); return(options); }
private ServiceRunnerOptions getOptions() { var options = ServiceTestRunner.GetDefaultOptions(); var assembly = typeof(TwitchProviderTest).Assembly; output.WriteLine(assembly.GetManifestResourceNames().Length.ToString()); output.WriteLine(string.Join(", ", assembly.GetManifestResourceNames())); options.ConfigStream = assembly.GetManifestResourceStream( "TPPCore.Service.Chat.Tests.test_files.twitch_config.json"); Assert.NotNull(options.ConfigStream); return(options); }
private void CleanupReport(string reportDBDir) { if (useReport) { string reportTemplateDir = Path.Combine(ServiceTestRunner.GetInstallPath(), @"bin\ReportResources"); try { CopyDirectory(reportTemplateDir, reportDBDir); } catch //(Exception ex) { //ToDo: LoggingService.Warn("Report Cleanup Error", ex); } } }
public ServiceFixture() { if (!Directory.Exists("cache/")) { Directory.CreateDirectory("cache/"); } if (!File.Exists("cache/emotes.json")) { string json = File.ReadAllText("../../../test_files/cache.json"); File.WriteAllText("cache/emotes.json", json); } Runner = new ServiceTestRunner(new TestEmoteService()); Runner.Service.Shutdown(); //don't bother running, we'll load emotes manually Runner.SetUp(GetOptions()); (Runner.Service as TestEmoteService).WaitForEmotes(); }