Skip to content

Releases: appercept/Delphi-WebMocks

3.2.1

18 Apr 12:32
Compare
Choose a tag to compare

What's Changed

Full Changelog: 3.2.0...3.2.1

3.2.0

20 Jun 09:06
Compare
Choose a tag to compare

What's Changed

Full Changelog: 3.1.0...3.2.0

3.1.0

09 Mar 21:23
Compare
Choose a tag to compare

Implemented enhancements:

  • Add support for matching requests by query params #46 (rhatherall)

3.0.1

08 Feb 21:43
Compare
Choose a tag to compare

Fixed Bugs

  • Windows Defender Firewall prompts on first run #44

3.0.0

27 Jan 23:40
Compare
Choose a tag to compare

New Features

  • Assertion matching by URL query parameters #41
WebMock.Assert
  .Get('/resource`)
  .WithQueryParam('ParamName', 'Value')
  .WasRequested;
  • Request content matching by Form-Data #20
    HTTP requests can be matched by form-data as submitted with content-type of application/x-www-form-urlencoded. Multiple matching field values can be combined. For example:
WebMock.StubRequest('*', '*')
  .WithFormData('AField', 'A value.')
  .WithFormData('AOtherField', 'Another value.');

To simply match the presence of a field, a wildcard * can be passed for the value.

  • Request matching by JSON values
    HTTP requests can be matched by JSON data as submitted with content-type of application/json using WithJSON. Multiple matching field values can be combined. For example:
WebMock.StubRequest('*', '*')
  .WithJSON('ABoolean', True)
  .WithJSON('AFloat', 0.123)
  .WithJSON('AInteger', 1)
  .WithJSON('AString', 'value');

The first argument can be a path. For example, in the following JSON, the path objects[0].key would match value 1.

{
  "objects": [
    { "key": "value 1" },
    { "key": "value 2" }
  ]
}

Assertions can also be made with JSON values:

WebMock.Assert
  .Patch('/resource`)
  .WithJSON('key', 'value')
  .WasRequested;

Fixed Bugs

  • Test failure due to platform line endings #43
  • Request history is not persisting query parameters #42
  • Cleaned up some memory leaks.

2.0.0

25 Nov 21:39
Compare
Choose a tag to compare

New Features

  • Dynamic response stubs #40
WebMock.StubRequest('*', '*')
  .ToRespondWith(
    procedure (const ARequest: IWebMockHTTPRequest;
               const AResponse: IWebMockResponseBuilder)
    begin
      AReponse
        .WithStatus(202)
        .WithHeader('header-1', 'a-value')
        .WithBody('Some content...');
    end
  );

Fixed Bugs

  • Unsupported Authorisation Scheme error when setting Authorization header. #35
  • Repeated calls to stubs with content causes exception. #33

Cleanup

  • Remove packages for Delphinus installation. #39
  • Remove Delphi. unit prefix. #38

1.3.0

07 Oct 19:46
Compare
Choose a tag to compare

Enhancements:

  • Add auto-port allocation #31

1.2.2

25 Jul 11:28
Compare
Choose a tag to compare

Fixed bugs:

  • Delphinus installation needs packages #29

1.2.1

23 Jul 23:36
Compare
Choose a tag to compare

First release with Delphinus support.