Ejemplo n.º 1
0
 public static void ClassCleanup()
 {
     if (sink != null)
     {
         Log.Unregister(sink);
         sink.Dispose();
         sink = null;
     }
 }
Ejemplo n.º 2
0
 public virtual void TestFixtureTearDown()
 {
     if (this.sink != null)
     {
         Log.Unregister(this.sink);
         this.sink.Dispose();
         this.sink = null;
     }
 }
Ejemplo n.º 3
0
        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);
        }
Ejemplo n.º 4
0
        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);
            };
        }
Ejemplo n.º 5
0
        public static void AssemblyCleanup()
        {
            if (filesProvider != null)
            {
                filesProvider.Dispose();
                filesProvider = null;
            }

            if (consoleEventSink != null)
            {
                Log.Unregister(consoleEventSink);
                consoleEventSink = null;
            }
        }
Ejemplo n.º 6
0
        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);
        }
Ejemplo n.º 7
0
        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);
        }
Ejemplo n.º 8
0
 public static void ClassInitialize(TestContext _)
 {
     sink = new ConsoleEventSink();
     Log.Register(sink);
 }
Ejemplo n.º 9
0
 public virtual void TestFixtureSetUp()
 {
     this.sink = new ConsoleEventSink();
     Log.Register(this.sink);
 }