Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Pipeline/Build.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ partial class Build : NukeBuild
/// <para />
/// Afterward, you can update the package reference in `Directory.Packages.props` and reset this flag.
/// </summary>
readonly BuildScope BuildScope = BuildScope.Default;
readonly BuildScope BuildScope = BuildScope.CoreOnly;

[Parameter("Github Token")] readonly string GithubToken;

Expand Down
11 changes: 10 additions & 1 deletion Source/aweXpect.Core/Core/Nodes/AndNode.cs
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,16 @@ public override async Task<ConstraintResult> IsMetBy<TValue>(TValue? value,

/// <inheritdoc />
public override void SetReason(BecauseReason becauseReason)
=> Current.SetReason(becauseReason);
{
if (_nodes.Any() && Current is ExpectationNode expectationNode && expectationNode.IsEmpty())
{
_nodes.Last().Item2.SetReason(becauseReason);
}
else
{
Current.SetReason(becauseReason);
}
}

/// <inheritdoc />
public override void AppendExpectation(StringBuilder stringBuilder, string? indentation = null)
Expand Down
11 changes: 10 additions & 1 deletion Source/aweXpect.Core/Core/Nodes/OrNode.cs
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,16 @@ public override async Task<ConstraintResult> IsMetBy<TValue>(TValue? value,

/// <inheritdoc />
public override void SetReason(BecauseReason becauseReason)
=> Current.SetReason(becauseReason);
{
if (_nodes.Any() && Current is ExpectationNode expectationNode && expectationNode.IsEmpty())
Comment thread
vbreuss marked this conversation as resolved.
{
_nodes.Last().Item2.SetReason(becauseReason);
}
else
{
Current.SetReason(becauseReason);
}
}

/// <inheritdoc />
public override void AppendExpectation(StringBuilder stringBuilder, string? indentation = null)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,12 @@ public async Task WhenNoExceptionIsThrown_ShouldFail()
Action action = () => { };

async Task<Exception> Act()
=> await That(action).ThrowsException();
=> await That(action).ThrowsException().Because("it should throw");
Comment thread
vbreuss marked this conversation as resolved.

await That(Act).ThrowsException()
.WithMessage("""
Expected that action
throws an exception,
throws an exception, because it should throw,
but it did not throw any exception
""");
}
Expand Down
Loading