public static void ClassCleanup() { if (sink != null) { Log.Unregister(sink); sink.Dispose(); sink = null; } }
public virtual void TestFixtureTearDown() { if (this.sink != null) { Log.Unregister(this.sink); this.sink.Dispose(); this.sink = null; } }
public static void AssemblyInitialize(TestContext Context) { Types.Initialize(typeof(FilesProvider).Assembly, typeof(LanguageTests).Assembly, typeof(Expression).Assembly); Log.Register(consoleEventSink = new ConsoleEventSink()); filesProvider = new FilesProvider("Data", "Default", 8192, 10000, 8192, Encoding.UTF8, 10000, true); Database.Register(filesProvider); }
public static void ClassInitialize(TestContext Context) { sink = new ConsoleEventSink(); Log.Register(sink); X509Certificate2 Certificate = Resources.LoadCertificate("Waher.Networking.HTTP.Test.Data.certificate.pfx", "testexamplecom"); // Certificate from http://www.cert-depot.com/ server = new HttpServer(8080, 8088, Certificate, new TextWriterSniffer(Console.Out, BinaryPresentationMethod.ByteCount)); ServicePointManager.ServerCertificateValidationCallback = delegate(Object obj, X509Certificate X509certificate, X509Chain chain, SslPolicyErrors errors) { return(true); }; }
public static void AssemblyCleanup() { if (filesProvider != null) { filesProvider.Dispose(); filesProvider = null; } if (consoleEventSink != null) { Log.Unregister(consoleEventSink); consoleEventSink = null; } }
public static async Task AssemblyInitialize(TestContext _) { Types.Initialize( typeof(FilesProvider).Assembly, typeof(ObjectSerializer).Assembly, typeof(LanguageTests).Assembly, typeof(Expression).Assembly); Log.Register(consoleEventSink = new ConsoleEventSink()); filesProvider = await FilesProvider.CreateAsync("Data", "Default", 8192, 10000, 8192, Encoding.UTF8, 10000, true); Database.Register(filesProvider); }
public static void AssemblyInitialize(TestContext Context) { Types.Initialize( typeof(IContentDecoder).Assembly, typeof(Waher.Content.Xml.Text.XmlCodec).Assembly, typeof(CoapEndpoint).Assembly, typeof(Lwm2mClient).Assembly, typeof(Database).Assembly, typeof(FilesProvider).Assembly, typeof(ICipher).Assembly); Log.Register(consoleEventSink = new ConsoleEventSink()); filesProvider = new FilesProvider("Data", "Default", 8192, 10000, 8192, Encoding.UTF8, 10000, true); Database.Register(filesProvider); }
public static void ClassInitialize(TestContext _) { sink = new ConsoleEventSink(); Log.Register(sink); }
public virtual void TestFixtureSetUp() { this.sink = new ConsoleEventSink(); Log.Register(this.sink); }