No description provided.
First implementation of a command history
You are actually not testing that the UpArrow gets pressed on the console, instead, you are testing that shellme.exe will be invoked with the string representation of the UpArrow key.
your UpArrow key should go somewhere here in the list. Face it: Everything you put in here is essentially the mocked keyboard input from the user!
Why would I want to inject the Command history into the console? If I write a WPF Console, does that mean I need to think about how to use the CommandHistory? Why would I want to do that? As a console author I want to write a console for a specific GUI technolgy but please don't force me to think about the inner workings of shell.me. Just make the history work out of the box no matter what kind of console we are dealing with!
This will fail if the command history is empty
This will fail, once we reached the end.
All this logic must stay out of the NativeConsoleWrapper. The NativeConsoleWrapper really just delegates to the System.Console. Why would I want to write this code again if I write a HtmlConsole, WpfConsole etc.
As I said. It makes no sense to push and duplicate this logic for all the different types of consoles. Just keep that outside.
Read my comments above. I really like to see this feature landing soonish!
removed injection of commandhistory into IConsole derived classes.
improvements of the implementation
Improvements of the CommandHistory Tests + InMemory
improved clear() in NativeConsoleWrapper.cs
commit saves my changes
The PR is outdated and the design wasn't production ready. Closing this here until we come up with another atempt ;-)