Arc.Unit.Tests.Infrastructure.Data.NHibernate.CriteriaExamples.Should_create_property_does_not_equal_property_criteria C# (CSharp) Method

Should_create_property_does_not_equal_property_criteria() private method

        public void Should_create_property_does_not_equal_property_criteria()
        {
            var expected = DetachedCriteria.For<Person>()
                .CreateAlias("Contacts", "contact", JoinType.InnerJoin)
                .Add(Restrictions.Not(Restrictions.EqProperty("contact.FirstName", "FirstName")));

            var contact = Alias.From<Person>(x => x.Contacts).For<Person>();

            var actual = Criteria.For<Person>()
                .InnerJoin(() => contact)
                .With<Person>(x => contact.FirstName != x.FirstName);

            AssertCriteria.AreEqual(actual, expected);
        }