public void DifferentResolvedNamesShouldHaveDifferentHashCodes()
            {
                SymbolicName name1 = SymbolicName.Of("a");
                SymbolicName name2 = SymbolicName.Of("b");

                name1.GetHashCode().ShouldNotBe(name2.GetHashCode());
            }
            public void EqualsShouldWorkDifferentValue()
            {
                SymbolicName name1 = SymbolicName.Of("a");
                SymbolicName name2 = SymbolicName.Of("b");

                name1.ShouldNotBe(name2);
            }
Exemple #3
0
        public static Property Create(INamed parentContainer, params string[] names)
        {
            SymbolicName requiredSymbolicName = ExtractRequiredSymbolicName(parentContainer);

            return(new Property(parentContainer,
                                requiredSymbolicName,
                                CreateListOfChainedNames(names)));
        }
            public void EqualsShouldWorkSameValue()
            {
                SymbolicName name1 = SymbolicName.Of("a");
                SymbolicName name2 = name1;
                SymbolicName name3 = SymbolicName.Of("a");

                name1.ShouldBeEquivalentTo(name2);
                name1.ShouldBeEquivalentTo(name3);
            }
        public void EqualsShouldWorkSameValue()
        {
            SymbolicName name1 = SymbolicName.Unresolved();
            SymbolicName name2 = name1;
            SymbolicName name3 = SymbolicName.Unresolved();

            name1.ShouldBeEquivalentTo(name2);
            name1.ShouldNotBe(name3);
            name2.ShouldNotBe(name3);
        }
Exemple #6
0
        public static Property Create(INamed parentContainer, Expression lookup)
        {
            SymbolicName requiredSymbolicName = ExtractRequiredSymbolicName(parentContainer);

            return(new Property(
                       parentContainer,
                       requiredSymbolicName,
                       new List <PropertyLookup> {
                PropertyLookup.ForExpression(lookup)
            }));
        }
Exemple #7
0
            public void PredicateAll()
            {
                var compoundCondition = new CompoundCondition(Operator.And);

                Node         bikeNode  = Cypher.Node("Bike");
                Relationship userBikes = _userNode.RelationshipTo(bikeNode, "OWNS");

                compoundCondition.Add(Predicates.Exists(userBikes));

                SymbolicName userOwns = Cypher.Name("userOwns");

                //var test = Cypher.ListWith(userOwns).In();


                StatementBuilder statement = Cypher
                                             .Match(new Where(compoundCondition), _userNode)
                                             .Return(_userNode);

                statement.Build().MatchSnapshot();
            }
 private void EnterVisitable(SymbolicName symbolicName) =>
 _writer.Write(symbolicName.Value);
        public void ShouldNotEqualResolved()
        {
            SymbolicName name1 = SymbolicName.Unresolved();

            name1.ShouldNotBe(SymbolicName.Of("a"));
        }
Exemple #10
0
 public MapProjection(SymbolicName name, MapExpression expression)
 {
     _name       = name;
     _expression = expression;
 }
Exemple #11
0
 public Relationship Named(SymbolicName newSymbolicName) =>
Exemple #12
0
 /// <summary>
 /// Creates a copy of this node with a new symbolic name.
 /// </summary>
 /// <param name="newSymbolicName">The new symbolic name.</param>
 /// <returns>The new node</returns>
 public Node Named(SymbolicName newSymbolicName)
 {
     Ensure.IsNotNull(newSymbolicName, "Symbolic name is required");
     return(new Node(newSymbolicName, Properties, Labels));
 }
Exemple #13
0
 /// <summary>
 /// Creates a copy of this node with a new symbolic name.
 /// </summary>
 /// <param name="newSymbolicName">The new symbolic name.</param>
 /// <returns>The new node</returns>
 public Node Named(string newSymbolicName)
 {
     Ensure.HasText(newSymbolicName, "Symbolic name is required");
     return(new Node(SymbolicName.Of(newSymbolicName), Properties, Labels));
 }