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 shouldCreateUniquenessConstraint()
        public virtual void ShouldCreateUniquenessConstraint()
        {
            // WHEN
            ConstraintDefinition constraint = CreateUniquenessConstraint(_label, _propertyKey);

            // THEN
            using (Transaction tx = _db.beginTx())
            {
                assertEquals(ConstraintType.UNIQUENESS, constraint.ConstraintType);

                assertEquals(_label.name(), constraint.Label.name());
                assertEquals(asSet(_propertyKey), Iterables.asSet(constraint.PropertyKeys));
                tx.Success();
            }
        }