Skip to content

Can I add "post actions" after (null).Should().BeNotNull() is triggered or any other FluentAssertions' extensions ? #906

@cbries

Description

@cbries

Description

I use fluentassertions in UI tests, works great.
Do you provide any approach for adding callbacks in case FluentAssertions' extensions are triggerd?

For example, when I use the following snippet:

[..snip..]
            var guid = GetGuidOf(srvExt0);
            var resWait = WaitFor((out bool b) => b = refMgr.IsReferenceAdded(guid));
            resWait.Should().BeTrue();
[..snip..]

In case resWait is false I like to create a screenshot of the UI.

Can I register callbacks for this case somehow?
Globally would be great to keep the tests clean and simple.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions