//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test void shouldCreateNothingForUnknownProtocolVersion()
        internal virtual void ShouldCreateNothingForUnknownProtocolVersion()
        {
            int                 protocolVersion = 42;
            BoltChannel         channel         = BoltTestUtil.newTestBoltChannel();
            BoltProtocolFactory factory         = new DefaultBoltProtocolFactory(mock(typeof(BoltConnectionFactory)), mock(typeof(BoltStateMachineFactory)), NullLogService.Instance);

            BoltProtocol protocol = factory(protocolVersion, channel);

            // handler is not created
            assertNull(protocol);
        }
Example #2
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
//ORIGINAL LINE: public static org.neo4j.bolt.runtime.BoltStateMachine newMachineWithTransactionSPI(org.neo4j.bolt.runtime.TransactionStateMachineSPI transactionSPI) throws org.neo4j.bolt.security.auth.AuthenticationException, org.neo4j.bolt.runtime.BoltConnectionFatality
        public static BoltStateMachine NewMachineWithTransactionSPI(TransactionStateMachineSPI transactionSPI)
        {
            BoltStateMachineSPI spi = mock(typeof(BoltStateMachineSPI), RETURNS_MOCKS);

            when(spi.TransactionSpi()).thenReturn(transactionSPI);

            BoltChannel      boltChannel = BoltTestUtil.newTestBoltChannel();
            BoltStateMachine machine     = new BoltStateMachineV1(spi, boltChannel, Clock.systemUTC());

            Init(machine);
            return(machine);
        }
Example #3
0
        public static BoltStateMachine NewMachine(BoltStateMachineV1SPI spi)
        {
            BoltChannel boltChannel = BoltTestUtil.newTestBoltChannel();

            return(new BoltStateMachineV1(spi, boltChannel, Clock.systemUTC()));
        }