Arc.Unit.Tests.Infrastructure.Data.NHibernate.CriteriaTests.Should_create_criteria_with_extensions C# (CSharp) Method

Should_create_criteria_with_extensions() private method

private Should_create_criteria_with_extensions ( ) : void
return void
        public void Should_create_criteria_with_extensions()
        {
            var expected = "DetachableCriteria((Name = Tiit and not (Id = 1)) and not (Name = Peeter)\r\nName asc)";

            var actual = Criteria.For<DomainObject>()
                .With<DomainObject>(x => x.Name == "Tiit" && x.Id != 1)
                .With<DomainObject>(x => x.Name != "Peeter")
                .AscendingOrdering<DomainObject>(x => x.Name)
                .ToString();

            Assert.That(actual, Is.EqualTo(expected));
        }