Arc.Unit.Tests.Infrastructure.Data.NHibernate.CriteriaExamples.Should_create_negation_criteria C# (CSharp) Méthode

Should_create_negation_criteria() private méthode

private Should_create_negation_criteria ( ) : void
Résultat void
        public void Should_create_negation_criteria()
        {
            var expected = DetachedCriteria.For<Person>()
                .Add(Restrictions.Not(
                         Restrictions.And(
                             Restrictions.Eq("FirstName", "Name"),
                             Restrictions.Eq("LastName", "Name"))));

            var actual = Criteria.For<Person>()
                .With<Person>(x => !(x.FirstName == "Name" && x.LastName == "Name"));

            AssertCriteria.AreEqual(actual, expected);
        }