Exemplo n.º 1
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void shouldAllowDataStatementAfterReadStatement() throws Exception
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
        public virtual void ShouldAllowDataStatementAfterReadStatement()
        {
            // given
            KernelTransaction tx = kernelTransaction(AnonymousContext.write());

            tx.DataRead();

            // when / then
            tx.DataWrite();
        }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void shouldNotAllowSchemaWriteAccessInWriteMode() throws Throwable
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
        public virtual void ShouldNotAllowSchemaWriteAccessInWriteMode()
        {
            // Given
            KernelTransactionImplementation tx = newTransaction(AnonymousContext.write());

            // Expect
            Exception.expect(typeof(AuthorizationViolationException));

            // When
            tx.SchemaWrite();
        }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void shouldAllowWritesInWriteMode() throws Throwable
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
        public virtual void ShouldAllowWritesInWriteMode()
        {
            // Given
            KernelTransactionImplementation tx = newTransaction(AnonymousContext.write());

            // When
            Write writes = tx.DataWrite();

            // Then
            assertNotNull(writes);
        }