public void service_param_is_mandatory()
 {
     MockRepository mocks = new MockRepository();
     IContextRequest req = mocks.StrictMock<IContextRequest>();
     With.Mocks(mocks)
         .Expecting(() =>
         {
             Expect.Call(req.GetParam("VERSION")).Return("1.3.0");
             Expect.Call(req.GetParam("SERVICE")).Return(null);
         })
         .Verify(() =>
         {
             IHandler handler = new GetCapabilities(Desc);
             IHandlerResponse resp = handler.Handle(Map, req);
             Assert.That(resp, Is.Not.Null);
         });
 }
 public void request_generates_valid_document()
 {
     MockRepository mocks = new MockRepository();
     IContextRequest req = mocks.StrictMock<IContextRequest>();
     With.Mocks(mocks)
         .Expecting(() =>
         {
             Expect.Call(req.GetParam("VERSION")).Return("1.3.0");
             Expect.Call(req.GetParam("SERVICE")).Return("WMS");
             Expect.Call(req.Url).Return(new Uri(Desc.OnlineResource)).Repeat.AtLeastOnce();
             Expect.Call(req.Encode(Desc.OnlineResource)).Return(Desc.OnlineResource);
         })
         .Verify(() =>
         {
             IHandler handler = new GetCapabilities(Desc);
             IHandlerResponse resp = handler.Handle(Map, req);
             Assert.That(resp, Is.Not.Null);
             Assert.IsInstanceOf<GetCapabilitiesResponse>(resp);
             Validate((GetCapabilitiesResponse)resp);
         });
 }