Esempio n. 1
0
        public BasicDataServiceTest(string conn)
        {
            m_connStr = !String.IsNullOrEmpty(conn) ? conn : DefaultTestConns.Get(typeof(TConn));

            m_log = LogManager.GetLogger(this.GetType());
            TestLogging.LogToConsole();    // TODO: Is that right?
        }
Esempio n. 2
0
        public SendPacketsAsync(ITestOutputHelper output)
        {
            _log = TestLogging.GetInstance();

            byte[] buffer = new byte[s_testFileSize];

            for (int i = 0; i < s_testFileSize; i++)
            {
                buffer[i] = (byte)(i % 255);
            }

            try
            {
                _log.WriteLine("Creating file {0} with size: {1}", TestFileName, s_testFileSize);
                using (FileStream fs = new FileStream(TestFileName, FileMode.CreateNew))
                {
                    fs.Write(buffer, 0, buffer.Length);
                }
            }
            catch (IOException)
            {
                // Test payload file already exists.
                _log.WriteLine("Payload file exists: {0}", TestFileName);
            }
        }
        public SocketPerformanceAsyncTests(ITestOutputHelper output)
        {
            _log = TestLogging.GetInstance();

            string env = Environment.GetEnvironmentVariable("SOCKETSTRESS_ITERATIONS");

            if (env != null)
            {
                _iterations = int.Parse(env);
            }
        }
Esempio n. 4
0
        public static void Validate(X509Certificate2Collection expected, X509Chain actual)
        {
            ITestOutputHelper log = TestLogging.GetInstance();

            log.WriteLine("CertificateChainValidation()");

            var expectedIndexed = new Dictionary <string, X509Certificate>();
            var actualIndexed   = new Dictionary <string, X509Certificate>();

            Assert.Equal(expected.Count, actual.ChainElements.Count);

            for (int i = 0; i < expected.Count; i++)
            {
                expectedIndexed.Add(expected[i].Thumbprint, expected[i]);
                actualIndexed.Add(actual.ChainElements[i].Certificate.Thumbprint, actual.ChainElements[i].Certificate);
            }

            foreach (string thumbprint in expectedIndexed.Keys)
            {
                Assert.Equal(expectedIndexed[thumbprint], actualIndexed[thumbprint]);
            }
        }
Esempio n. 5
0
 public DualMode(ITestOutputHelper output)
 {
     _log = TestLogging.GetInstance();
     Assert.True(Capability.IPv4Support() && Capability.IPv6Support());
 }
Esempio n. 6
0
 public ConnectExTest(ITestOutputHelper output)
 {
     _log = TestLogging.GetInstance();
 }
 protected PersistentDataStoreBaseTests(ITestOutputHelper testOutput)
 {
     _testLogging = TestLogging.TestOutputAdapter(testOutput);
 }
 public ServerNoEncryptionTest()
 {
     _log = TestLogging.GetInstance();
 }
Esempio n. 9
0
 public NetworkInterfaceIPv4Statistics()
 {
     _log = TestLogging.GetInstance();
 }
Esempio n. 10
0
 public SocketPerformanceAsyncTests(ITestOutputHelper output)
 {
     _log = TestLogging.GetInstance();
 }
Esempio n. 11
0
 public UnixDomainSocketTest(ITestOutputHelper output)
 {
     _log = TestLogging.GetInstance();
 }
Esempio n. 12
0
 public DnsEndPointTest(ITestOutputHelper output)
 {
     _log = TestLogging.GetInstance();
 }
Esempio n. 13
0
 public ClientDefaultEncryptionTest()
 {
     _log = TestLogging.GetInstance();
 }
Esempio n. 14
0
 public Bootstrapper(TestLogging logging)
 {
     this.logging = logging;
 }
Esempio n. 15
0
 public DisconnectTest(ITestOutputHelper output)
 {
     _log = TestLogging.GetInstance();
     Assert.True(Capability.IPv4Support() || Capability.IPv6Support());
 }
 public NetworkInterfaceBasicTest()
 {
     _log = TestLogging.GetInstance();
 }
 public IPInterfacePropertiesTest()
 {
     _log = TestLogging.GetInstance();
 }
Esempio n. 18
0
 public IPGlobalPropertiesTest()
 {
     _log = TestLogging.GetInstance();
 }
 protected BigSegmentStoreBaseTests(ITestOutputHelper testOutput)
 {
     _testLogging = TestLogging.TestOutputAdapter(testOutput);
 }
Esempio n. 20
0
 public AcceptAsync(ITestOutputHelper output)
 {
     _log = TestLogging.GetInstance();
 }
Esempio n. 21
0
 public ServerAsyncAuthenticateTest()
 {
     _log = TestLogging.GetInstance();
     _serverCertificate = TestConfiguration.GetServerCertificate();
 }
Esempio n. 22
0
 public ClientAsyncAuthenticateTest()
 {
     _log = TestLogging.GetInstance();
 }
 public static TestLoggingAssertions Should(this TestLogging logger)
 {
     return(new TestLoggingAssertions(logger));
 }