Skip to content

Allow setting output and error streams to make CommnadLineApplication… - #142

Merged
pranavkm merged 1 commit into
devfrom
prkrishn/testable-out
Aug 31, 2016
Merged

Allow setting output and error streams to make CommnadLineApplication…#142
pranavkm merged 1 commit into
devfrom
prkrishn/testable-out

Conversation

@pranavkm

Copy link
Copy Markdown

… easier to test.

@pranavkm

Copy link
Copy Markdown
Author

cc @natemcmaster \ @NTaylorMullen

public Func<string> LongVersionGetter { get; set; }
public Func<string> ShortVersionGetter { get; set; }
public readonly List<CommandLineApplication> Commands;
public TextWriter Out { get; set; } = Console.Out;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do these need to be public? Could these be passed in as constructor arguments instead?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All the other switches on this are public, including fields like the one on the line above. Was keeping it consistent.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good.

@natemcmaster

Copy link
Copy Markdown

:shipit:

1 similar comment
@NTaylorMullen

Copy link
Copy Markdown

:shipit:

@pranavkm
pranavkm merged commit 1a59278 into dev Aug 31, 2016
@pranavkm
pranavkm deleted the prkrishn/testable-out branch August 31, 2016 17:22
@ghost ghost locked as resolved and limited conversation to collaborators May 30, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants