//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test public void shouldNotAllowCreationOfConstraintsWhenInHA() throws Exception //JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#: public virtual void ShouldNotAllowCreationOfConstraintsWhenInHA() { //noinspection deprecation GraphDatabaseAPI db = new FakeHaDatabase(this); ThreadToStatementContextBridge stmtBridge = Db.DependencyResolver.resolveDependency(typeof(ThreadToStatementContextBridge)); using (Transaction ignored = Db.beginTx()) { KernelTransaction ktx = stmtBridge.GetKernelTransactionBoundToThisThread(true); try { ktx.SchemaWrite().uniquePropertyConstraintCreate(forLabel(1, 1)); fail("expected exception here"); } catch (InvalidTransactionTypeKernelException e) { assertThat(e.Message, containsString("HA")); } } Db.shutdown(); }
public CommunityEditionModuleAnonymousInnerClass(FakeHaDatabase outerInstance, UnknownType platformModule) : base(platformModule) { this.outerInstance = outerInstance; }
public GraphDatabaseFacadeFactoryAnonymousInnerClass(FakeHaDatabase outerInstance, DatabaseInfo community, System.Func <PlatformModule, AbstractEditionModule> factory, File storeDir, GraphDatabaseFacadeFactory.Dependencies dependencies) : base(community, factory) { this.outerInstance = outerInstance; this._storeDir = storeDir; this._dependencies = dependencies; }