hibri / HttpMock

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

Stubs are not matched when they are more specific. The first matching stub is returned #27

Closed hibri closed 10 years ago

hibri commented 10 years ago
        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));