Example #1
0
		public void Test()
		{
			IDriver driver = sessions.ConnectionProvider.Driver;
			if (!driver.SupportsMultipleQueries)
			{
				Assert.Ignore("Driver {0} does not support multi-queries", driver.GetType().FullName);
			}
			
			using (ISession session = sessions.OpenSession())
			using (ITransaction transaction = session.BeginTransaction())
			{
				_keyword = new Keyword();
				session.Save(_keyword);

				NodeKeyword nodeKeyword = new NodeKeyword();
				nodeKeyword.NodeId = 1;
				nodeKeyword.Keyword = _keyword;
				session.Save(nodeKeyword);

				transaction.Commit();
			}

			using (ISession session = sessions.OpenSession())
			{
				//If uncomment the line below the test will pass
				//GetResult(session);
				IList result = GetResult(session);
				Assert.That(result, Has.Count.EqualTo(2));
				Assert.That(result[0], Has.Count.EqualTo(1));
				Assert.That(result[1], Has.Count.EqualTo(1));
			}
		}
Example #2
0
		public void Test()
		{
			using (var session = sessions.OpenSession())
			using (var transaction = session.BeginTransaction())
			{
				_keyword = new Keyword();
				session.Save(_keyword);

				var nodeKeyword = new NodeKeyword();
				nodeKeyword.NodeId = 1;
				nodeKeyword.Keyword = _keyword;
				session.Save(nodeKeyword);

				transaction.Commit();
			}

			using (var session = sessions.OpenSession())
			{
				//If uncomment the line below the test will pass
				//GetResult(session);
				var result = GetResult(session);
				Assert.That(result, Has.Count.EqualTo(2));
				Assert.That(result[0], Has.Count.EqualTo(1));
				Assert.That(result[1], Has.Count.EqualTo(1));
			}
		}
Example #3
0
        public override bool Equals(object obj)
        {
            NodeKeyword other = (NodeKeyword)obj;

            return(NodeId == other.NodeId && Keyword == other.Keyword);
        }