dotnet-installer/test/Microsoft.DotNet.Tools.Tests.Utilities/Assertions/AssertionScopeExtensions.cs

20 lines
No EOL
653 B
C#

// Copyright (c) .NET Foundation and contributors. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
using FluentAssertions.Execution;
namespace Microsoft.DotNet.Tools.Test.Utilities
{
public static class AssertionScopeExtensions
{
public static Continuation FailWithPreformatted(this AssertionScope assertionScope, string message)
{
if (!assertionScope.Succeeded)
{
assertionScope.AddFailure(message);
}
return new Continuation(assertionScope, assertionScope.Succeeded);
}
}
}