public void Assert_exception_thrown_when_calling_request_with_null_argument_on_revision_handler() { Scenario.StartNew(this, scenario => { scenario.Given("A RevisionHandler exists", () => handler = new RevisionHandler()); scenario.When("Request is called on it with an argument of null", () => handler.Request(null)); scenario.Then("An exception is thrown"); }); }
public void Assert_exception_not_thrown_when_calling_successor_with_legal_argument_on_revision_handler () { Scenario.StartNew(this, scenario => { scenario.Given("A RevisionHandler exists", () => handler = new RevisionHandler()); scenario.When("Request is called on it with a legal argument", () => handler.Successor(new RevisionHandler())); scenario.Then("An exception is not thrown"); }); }
public void Assert_exception_not_thrown_when_calling_request_with_legal_argument_on_revision_handler() { Scenario.StartNew(this, scenario => { scenario.Given("A RevisionHandler with a valid successor exists", () => { handler = new RevisionHandler(); handler.Successor(new RevisionHandler()); }); scenario.When("Request is called on it with a legal argument", () => handler.Request(new SpecificationRequest(new AllChangesetsSpecification(), new QueryModel()))); scenario.Then("An exception is not thrown"); }); }
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); }); }); }
public void Assert_exception_thrown_when_calling_successor_with_null_argument_on_revision_handler() { Scenario.StartNew(this, scenario => { scenario.Given("A RevisionHandler exists", () => handler = new RevisionHandler()); scenario.When("Successor is called with null", () => handler.Successor(null)); scenario.Then("An exception is thrown"); }); }