示例#1
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void shouldThrowAnExceptionIfThePropertyKeyDoesntExist()
        public virtual void ShouldThrowAnExceptionIfThePropertyKeyDoesntExist()
        {
            when(_tokenRead.propertyKey("nonExistentProperty")).thenReturn(-1);

            try
            {
                _procedure.awaitIndexByPattern(":Label(nonExistentProperty)", TIMEOUT, _timeUnit);
                fail("Expected an exception");
            }
            catch (ProcedureException e)
            {
                assertThat(e.Status(), @is(Org.Neo4j.Kernel.Api.Exceptions.Status_Schema.PropertyKeyAccessFailed));
            }
        }