hibri / HttpMock

A library for creating Http servers on the fly in tests and stubbing responses
MIT License
128 stars 44 forks source link

Request matching order fix #26

Closed hibri closed 10 years ago

hibri commented 10 years ago

The order of the stubs should not matter

        stubHttp.Stub(x => x.Get("/api/path")).Return("PATH").OK();
        stubHttp.Stub(x => x.Get("/api/path/one")).Return(expectedResponse).OK();

        var result = new WebClient().DownloadString(string.Format("{0}/api/path/one", _hostUrl));

        Assert.That(result, Is.EqualTo(expectedResponse));