예제 #1
0
        public void CloneQueryOver()
        {
            QueryOver <Person> expected =
                QueryOver.Of <Person>()
                .Where(p => p.Name == "test")
                .Select(p => p.Name);

            QueryOver <Person> actual = expected.Clone();

            Assert.That(actual, Is.Not.SameAs(expected));
            Assert.That(actual.UnderlyingCriteria, Is.Not.SameAs(expected.UnderlyingCriteria));
            AssertCriteriaAreEqual(expected.UnderlyingCriteria, actual.UnderlyingCriteria);
        }