Skip to content

Commit ac5ea26

Browse files
Reshuffle some structure.
Prepare some work an a new confirm command Prepare the tests Add some improvement to documentation.
1 parent de75c6b commit ac5ea26

24 files changed

Lines changed: 183 additions & 35 deletions

CoreConsole/ConResources.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88

99
using System.Collections.Generic;
1010
using Interpreter;
11+
using Interpreter.Resources;
1112

1213
namespace CoreConsole
1314
{

InterpreteTests/CommandBuilder.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,6 @@ public void ParseIfElseClausesWithNestedIfElseReturnsCorrectStructure()
174174
//Assert.IsTrue(areEqual, message);
175175
}
176176

177-
178177
/// <summary>
179178
/// Parses if else clauses empty input returns empty dictionary.
180179
/// </summary>

InterpreteTests/FeedbackTests.cs

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
using System.Collections.Generic;
1010
using System.Diagnostics;
1111
using Interpreter;
12+
using Interpreter.Resources;
1213
using Microsoft.VisualStudio.TestTools.UnitTesting;
1314

1415
namespace InterpreteTests
@@ -176,6 +177,48 @@ public void FeedbackExtensionExternal()
176177
//Trace.WriteLine(_outCommand.ToString());
177178
}
178179

180+
/// <summary>
181+
/// Feedback and extension external test.
182+
/// </summary>
183+
[TestMethod]
184+
public void ConfirmInternalTest()
185+
{
186+
// Arrange
187+
188+
// Act
189+
var prompt = new Prompt();
190+
prompt.SendLogs += SendLogs;
191+
prompt.SendCommands += SendCommands;
192+
prompt.Initiate(userFeedback: Feedback);
193+
prompt.ConsoleInput("confirm()");
194+
prompt.ConsoleInput("confirm(1)");
195+
196+
//Assert.IsFalse(_log.Contains("Help com1"), "No help provided.");
197+
//// Assert
198+
//Assert.AreEqual("Input was not valid.", _log, "Error was not catched.");
199+
200+
//prompt.ConsoleInput("mehh");
201+
202+
//Assert.AreEqual("Input was not valid.", _log, "Error was not catched.");
203+
204+
//prompt.ConsoleInput(" yeS ");
205+
206+
//Trace.WriteLine(_outCommand.ToString());
207+
208+
//Assert.IsNotNull(_outCommand, "Out Command was not empty.");
209+
210+
//prompt.ConsoleInput("List().Help()");
211+
//Assert.IsTrue(_log.Contains("You now have the following Options:"), "Wrong Options provided.");
212+
213+
//prompt.ConsoleInput("YeS ");
214+
215+
//Assert.IsTrue(_log.Contains("Special case"), "Wrong Commands listed");
216+
217+
//Trace.WriteLine(_log);
218+
//Trace.WriteLine(_outCommand.ToString());
219+
}
220+
221+
179222

180223
/// <summary>
181224
/// Listen to Messages

InterpreteTests/InterpretInternal.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
using System.Collections.Generic;
1010
using ExtendedSystemObjects;
1111
using Interpreter;
12+
using Interpreter.Resources;
1213
using Microsoft.VisualStudio.TestTools.UnitTesting;
1314

1415
namespace InterpreteTests

Interpreter/ConditionalExpressions.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
using System.Collections.Generic;
2727
using System.Runtime.CompilerServices;
2828
using ExtendedSystemObjects;
29+
using Interpreter.Resources;
2930

3031
namespace Interpreter
3132
{

Interpreter/InCommand.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010

1111
using System;
1212
using System.Diagnostics;
13+
using Interpreter.Resources;
1314

1415
namespace Interpreter
1516
{
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
* COPYRIGHT: See COPYING in the top level directory
3-
* PROJECT: Interpreter
4-
* FILE: Interpreter/IPrompt.cs
3+
* PROJECT: Interpreter.Interface
4+
* FILE: Interpreter.Interface/IPrompt.cs
55
* PURPOSE: The Prompt Interface
66
* PROGRAMMER: Peter Geinitz (Wayfarer)
77
*/
@@ -11,7 +11,7 @@
1111

1212
using System.Collections.Generic;
1313

14-
namespace Interpreter
14+
namespace Interpreter.Interface
1515
{
1616
/// <summary>
1717
/// The IPrompt interface.

Interpreter/IrtExtension.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88

99
using System.Collections.Generic;
1010
using System.Text.RegularExpressions;
11+
using Interpreter.Resources;
1112

1213
namespace Interpreter
1314
{

Interpreter/IrtFeedback.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
*/
88

99
using System.Diagnostics;
10+
using Interpreter.Resources;
1011

1112
namespace Interpreter
1213
{

Interpreter/IrtFeedbackInputEventArgs.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
* PROGRAMER: Peter Geinitz (Wayfarer)
77
*/
88

9+
using Interpreter.Resources;
10+
911
namespace Interpreter
1012
{
1113
/// <summary>

0 commit comments

Comments
 (0)