public void Assure_can_handle_revision_numbers_less_than_one()
        {
            QueryModel queryModel = null;
            RevisionHandler revisionHandler = null;
            SpecificationRequest specificationRequest = null;

            Scenario.StartNew(this, scenario =>
            {
                scenario.Given("a query model and revision handler exist", () =>
                {
                    queryModel = new QueryModel();
                    revisionHandler = new RevisionHandler();
                    specificationRequest =
                        new SpecificationRequest(new ChangesetsAfterRevisionSpecification(0), queryModel);
                });

                scenario.When("all changesets are requested, including revision zero (domain-specific)",() =>
                {
                    revisionHandler.HandleRequest(specificationRequest);
                });

                scenario.Then("the query model should request changsets from revision 1 and up", () =>
                {
                    queryModel.RevisionFrom.ChangesetId.ShouldBe(1);
                });
            });
        }
Example #2
0
 public SpecificationRequest(Specification<Changeset> specification, QueryModel query)
 {
     Specification = specification;
     Query = query;
 }
Example #3
0
 public void Optimize(Specification<Changeset> specification, QueryModel queryModel)
 {
     Handler.Request(new SpecificationRequest(specification, queryModel));
 }