Request: .Should().PushAnySatisfying(..)

Open
#2 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
35/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
csharp
Domain
testing

Research direction

No implementation file or test path is identified in the issue. Start by locating the existing collection assertion and SatisfyRespectively implementations, then add coverage for an unordered element satisfying the supplied assertions; done means the example usage works and the new behavior is tested.

Written by the indexing model from the issue text.

Description

Description

Just started using FA.Reactive and it's awesome, great work!

I have a suggestion for an assertion similar to SatisfyRespectively for collection assertions: PushAnySatisfying

Use Case

I am looking for an occurrence of a particular element that satisfies some constraints. I don't care about the ordering, hence the Any of PushAnySatisfying.

Example usage:

observable.Observe()
    .Should()
    .PushAnySatisfying(e => {
        e.Property.Should().Be("value");
        e.OtherProperty.Should().Be("other value");
    });
Dominant language
C#
Stars
1
Forks
3
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Similar issues

More C# issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.