//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test public void shouldSetLatestConstraintRule() throws Exception //JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#: public virtual void ShouldSetLatestConstraintRule() { // Given SchemaRecord beforeRecords = Serialize(_rule, _id, true, true); SchemaRecord afterRecords = Serialize(_rule, _id, true, false); when(_neoStores.SchemaStore).thenReturn(_schemaStore); when(_neoStores.MetaDataStore).thenReturn(_metaDataStore); ConstraintRule schemaRule = ConstraintRule.constraintRule(_id, ConstraintDescriptorFactory.uniqueForLabel(_labelId, _propertyKey), 0); // WHEN VisitSchemaRuleCommand(_storeApplier, new Command.SchemaRuleCommand(beforeRecords, afterRecords, schemaRule)); // THEN verify(_schemaStore).updateRecord(Iterables.first(afterRecords)); verify(_metaDataStore).LatestConstraintIntroducingTx = _txId; }
public static ConstraintRule RelPropertyExistenceConstraintRule(long ruleId, int labelId, int propertyId) { return(ConstraintRule.constraintRule(ruleId, ConstraintDescriptorFactory.existsForRelType(labelId, propertyId))); }
public static ConstraintRule UniquenessConstraintRule(long ruleId, int labelId, int propertyId, long indexId) { return(ConstraintRule.constraintRule(ruleId, ConstraintDescriptorFactory.uniqueForLabel(labelId, propertyId), indexId)); }
public override ConstraintRule CreateUniquenessConstraintRule(long ruleId, UniquenessConstraintDescriptor descriptor, long indexId) { return(ConstraintRule.constraintRule(ruleId, descriptor, indexId)); }
public override ConstraintRule CreateExistenceConstraint(long ruleId, ConstraintDescriptor descriptor) { return(ConstraintRule.constraintRule(ruleId, descriptor)); }
public override ConstraintRule CreateNodeKeyConstraintRule(long ruleId, NodeKeyConstraintDescriptor descriptor, long indexId) { return(ConstraintRule.constraintRule(ruleId, descriptor, indexId)); }