Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CommandAppTester.Output will produce MemoryOverflow when capturing a Rule output #1205

Open
MrBogomips opened this issue Mar 29, 2023 · 1 comment
Labels
bug Something isn't working needs triage

Comments

@MrBogomips
Copy link

MrBogomips commented Mar 29, 2023

Information

  • OS: MacOS
  • Version: Darwin 22.3.0
  • Terminal: iTerm

Describe the bug
I was testing a command that produces some Rules.
Accessing to CommandAppResult.Output will produce a MemoryOverflow.

To Reproduce
Supposing your Command Under Test will write a Rule on the output, it would suffice to assert. For example:

// Arrange
var sut = GetCommandAppTester();

// Act
var result = sut.Run("ThisDemoDoesntExist");

// Assert
result.ExitCode.Should().Be(-1);
result.Output.Should().Contain("no demo found matching your criteria.");  // Throws

Expected behavior
Simply works as expected :)

Additional context
Removing the Rule all the tests worked.


Please upvote 👍 this issue if you are interested in it.

@MrBogomips MrBogomips added bug Something isn't working needs triage labels Mar 29, 2023
@Blackbaud-CameronBeacham

Any update on this? I just had to remove the usage of Rule from my app because the CommandAppTester breaks.

@github-actions github-actions bot added the ⭐ top bug Top bug. label May 16, 2024
@github-actions github-actions bot removed the ⭐ top bug Top bug. label Jul 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs triage
Projects
Status: Todo 🕑
Development

No branches or pull requests

2 participants