예제 #1
0
 public void EqJoin()
 {
     DoEqJoin(
         testTable.EqJoin(
             testObject => testObject.Name,
             anotherTestTable
             )
         ).Wait();
 }
예제 #2
0
        public void EqJoinMultiIndex()
        {
            var enumerable = connection.Run(
                anotherTestTable.EqJoin(
                    anotherTestObject => anotherTestObject.FirstName,
                    testTable,
                    tagsIndex
                    )
                );

            Assert.That(enumerable, Is.Not.Null);

            var objects = new List <Tuple <AnotherTestObject, TestObject> >();
            var count   = 0;

            foreach (var tup in enumerable)
            {
                objects.Add(tup);
                ++count;

                Assert.That(tup.Item1, Is.Not.Null);
                Assert.That(tup.Item2, Is.Not.Null);
                tup.Item2.Tags.Should().Contain(tup.Item1.FirstName);
            }
            Assert.That(count, Is.EqualTo(3));
            Assert.That(objects, Has.Count.EqualTo(3));
        }