public void ShouldConnectThroughTcpProxy() { using (var tcpProxy = new TcpProxy(12424)) using (var context = new TestDatabaseContextProxy(tcpProxy.Forwarding)) using (var database = new ODatabase(TestConnectionProxy.GlobalTestDatabaseAlias)) { SimpleTest(database); } }
public void ShouldReconnectIfTcpProxyIsRestored() { using (var tcpProxy = new TcpProxy(12424)) using (var context = new TestDatabaseContextProxy(tcpProxy.Forwarding)) using (var database = new ODatabase(TestConnectionProxy.GlobalTestDatabaseAlias)) { tcpProxy.End(); tcpProxy.Start(); try { SimpleTest(database); Assert.True(false, "SimpleTest should of failed without a socket connection"); } catch { SimpleTest(database); } } }
public void ShouldReconnectIfTcpProxyIsRestored() { using (var tcpProxy = new TcpProxy(12424)) using (var context = new TestDatabaseContextProxy(tcpProxy.Forwarding)) using (var database = new ODatabase(TestConnectionProxy.GlobalTestDatabaseAlias)) { tcpProxy.End(); tcpProxy.Start(); try { SimpleTest(database); Assert.Fail("SimpleTest should of failed without a socket connection"); } catch { SimpleTest(database); } } }