Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: Testably/aweXpect
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v2.19.1
Choose a base ref
...
head repository: Testably/aweXpect
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v2.20.0
Choose a head ref
  • 7 commits
  • 52 files changed
  • 1 contributor

Commits on Jul 19, 2025

  1. feat: add HasItem expectation for collections (#681)

    ## Have item at index
    
    You can verify that the collection contains an item that satisfies the expectation on a given index (or any index).
    
    ```csharp
    IEnumerable<string> values = ["0th item", "1st item", "2nd item", "3rd item"];
    
    await Expect.That(values).HasItem("1st item").AtIndex(1);
    await Expect.That(values).HasItem(a => a.StartsWith("2nd")).AtAnyIndex();
    ```
    
    *Note: The same expectation works also for `IAsyncEnumerable<T>`.*
    vbreuss authored Jul 19, 2025
    Configuration menu
    Copy the full SHA
    a7ec361 View commit details
    Browse the repository at this point in the history
  2. chore: update aweXpect.Core to v2.15.0 (#682)

    Also update aweXpect to v2.19.1 and change build scope to "Default"
    vbreuss authored Jul 19, 2025
    Configuration menu
    Copy the full SHA
    fe15b21 View commit details
    Browse the repository at this point in the history

Commits on Jul 20, 2025

  1. feat: support strings in HasItem (#684)

    This PR enhances the `HasItem` functionality to provide specialized string comparison capabilities, moving from generic object comparison to dedicated string-specific operations. The implementation adds comprehensive string matching options including prefix, suffix, wildcard, regex patterns, and various whitespace/case handling options.
    
    - Introduces `StringHasItemResult` classes for specialized string item verification with rich comparison options
    - Adds string-specific `HasItem` overloads for both sync and async enumerables, including `ImmutableArray<string?>`
    - Refactors existing `ObjectHasItemResult` to implement `IOptionsProvider` interface and moves `Equivalent` method to an extension method
    vbreuss authored Jul 20, 2025
    Configuration menu
    Copy the full SHA
    b774dc8 View commit details
    Browse the repository at this point in the history
  2. feat: add HasItemThat for collections (#685)

    You can now also use expectations on the individual items.
    
    ```csharp
    IEnumerable<string> values = ["0th item", "1st item", "2nd item", "3rd item"];
    
    await Expect.That(values).HasItemThat(it => it.IsEqualTo("1st item")).AtIndex(1);
    await Expect.That(values).HasItemThat(it => it.StartsWith("2nd").And.EndsWith("item")).AtAnyIndex();
    ```
    
    *Note: The same expectation works also for `IAsyncEnumerable<T>`.*
    vbreuss authored Jul 20, 2025
    Configuration menu
    Copy the full SHA
    da62c2c View commit details
    Browse the repository at this point in the history
  3. chore: update aweXpect.Core to v2.15.1 (#686)

    This PR updates the aweXpect.Core package from version 2.15.0 to 2.15.1 and adjusts the build scope configuration accordingly.
    
    - Updates aweXpect.Core package version to 2.15.1
    - Changes BuildScope from CoreOnly back to Default
    vbreuss authored Jul 20, 2025
    Configuration menu
    Copy the full SHA
    5b6272d View commit details
    Browse the repository at this point in the history

Commits on Jul 21, 2025

  1. feat: avoid the need to specify AtAnyIndex for HasItem and `HasIt…

    …emThat` (#687)
    
    This PR simplifies the collection item verification API by removing the need to explicitly call `.AtAnyIndex()` after `HasItem()` or `HasItemThat()` methods. The change makes the API more intuitive by defaulting to checking items at any index while still allowing specific index checks with `.AtIndex(index)`.
    
    - Refactored `HasItemResult<TCollection>` to inherit from `AndOrResult` and removed the `AtAnyIndex()` method
    - Updated all test cases to remove `.AtAnyIndex()` calls, making them more concise
    - Updated API documentation and usage examples to reflect the simplified syntax
    vbreuss authored Jul 21, 2025
    Configuration menu
    Copy the full SHA
    fa77ff6 View commit details
    Browse the repository at this point in the history
  2. chore: update aweXpect.Core to v2.15.2 (#688)

    This PR updates the aweXpect.Core package to version 2.15.2 and re-enables the full build scope by changing from CoreOnly to Default, which aligns with the typical workflow after package updates are completed.
    
    - Updates aweXpect.Core package reference from version 2.15.1 to 2.15.2
    - Changes BuildScope from CoreOnly back to Default to enable full build pipeline
    vbreuss authored Jul 21, 2025
    Configuration menu
    Copy the full SHA
    12de9e0 View commit details
    Browse the repository at this point in the history
Loading