예제 #1
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void defaultValueWhenCustomTransactionTimeoutNotANumber()
        public virtual void DefaultValueWhenCustomTransactionTimeoutNotANumber()
        {
            when(_request.getHeader(MAX_EXECUTION_TIME_HEADER)).thenReturn("aa");
            Log  log = LogProvider.getLog(typeof(HttpServletRequest));
            long transactionTimeout = getTransactionTimeout(_request, log);

            assertEquals("Transaction timeout not specified.", 0, transactionTimeout);
            LogProvider.rawMessageMatcher().assertContains("Fail to parse `max-execution-time` " + "header with value: 'aa'. Should be a positive number.");
        }
예제 #2
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void startDefaultTransactionWhenHeaderHasIncorrectValue()
        public virtual void StartDefaultTransactionWhenHeaderHasIncorrectValue()
        {
            when(_request.getHeader(HttpHeaderUtils.MAX_EXECUTION_TIME_HEADER)).thenReturn("not a number");

            CypherExecutor cypherExecutor = new CypherExecutor(_database, _logProvider);

            cypherExecutor.Start();

            cypherExecutor.CreateTransactionContext(QUERY, VirtualValues.emptyMap(), _request);

            verify(_databaseQueryService).beginTransaction(KernelTransaction.Type.@implicit, AUTH_DISABLED);
            _logProvider.rawMessageMatcher().assertContains("Fail to parse `max-execution-time` header with value: 'not a number'. Should be a positive number.");
        }
예제 #3
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void shouldLogShutdown()
        public virtual void ShouldLogShutdown()
        {
            _server.stop();
            _logProvider.rawMessageMatcher().assertContains("Stopped.");
        }