|
9 | 9 | using System.Collections.Generic; |
10 | 10 | using System.Diagnostics; |
11 | 11 | using Interpreter; |
| 12 | +using Interpreter.Resources; |
12 | 13 | using Microsoft.VisualStudio.TestTools.UnitTesting; |
13 | 14 |
|
14 | 15 | namespace InterpreteTests |
@@ -176,6 +177,48 @@ public void FeedbackExtensionExternal() |
176 | 177 | //Trace.WriteLine(_outCommand.ToString()); |
177 | 178 | } |
178 | 179 |
|
| 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 | + |
179 | 222 |
|
180 | 223 | /// <summary> |
181 | 224 | /// Listen to Messages |
|
0 commit comments