示例#1
0
        protected void Initialize()
        {
            RawInputParser = new RawInputParser();
            WindowCreator  = new WindowCreator(RawInputParser);
            var windowHandle = WindowCreator.CreateWindow();

            Devices = new DeviceEnumerator(RawInputParser, windowHandle);
        }
示例#2
0
 /// <summary>
 /// This is a private helper method that will read a dictionary of test
 /// inputs and expected outputs. For each item in the dictionary, the
 /// actual results of the RawInputParser.ParseExpressionIntoList method
 /// will be checked using the CheckSyntaxTokenListsAreEqual method.
 /// </summary>
 private void TestAllExpressionsParseCorrectly(Dictionary <string, string[]> expressionsAndResults)
 {
     foreach (var currentTestCase in expressionsAndResults)
     {
         string   inputExpression         = currentTestCase.Key;
         string[] expectedSyntaxTokenList = currentTestCase.Value;
         string[] actualSyntaxTokenList   = RawInputParser.ParseExpressionIntoList(inputExpression);
         Assert.IsTrue(CheckSyntaxTokenListsAreEqual(expectedSyntaxTokenList, actualSyntaxTokenList));
     }
 }
 public string[] ParseInputLine(string inputLine)
 {
     return(RawInputParser.ParseExpressionIntoList(inputLine));
 }
示例#4
0
 public void RawInputParserCanBeInstantiated()
 {
     var testObject = new RawInputParser();
 }
示例#5
0
 public RawInputParserTest()
 {
     _RawInputParser = new RawInputParser();
 }