示例#1
0
 public void TestCreateMultiPressCommands2()    // string abc
 {
     MultiPressCommand[] mpc = MultiPress.CreateMultiPressCommands("abc");
     Assert.IsTrue(mpc.Length == 3);
     mpc.Should().BeEquivalentTo(Expected2);
     // Assert.AreEqual(Expected2, mpc);  // tests for sameness, i.e. objects in array must be the same, not their contents
 }
示例#2
0
 public void TestCreateMultiPressCommands1()   // emtpy string
 {
     MultiPressCommand[] mpc = MultiPress.CreateMultiPressCommands("");
     Assert.IsTrue(mpc.Length == 0);
     // string sIN = TestContext.ResultsDirectory;    // "I:\\Thomas\\Sammlung\\Computer\\Programming\\Visual Studio 2012\\Projects\\iRadio\\TestResults\\Deploy_Thomas H. Schmidt 2020-06-11 18_03_47\\In"
     // string sOUT = TestContext.TestDeploymentDir;  // "I:\\Thomas\\Sammlung\\Computer\\Programming\\Visual Studio 2012\\Projects\\iRadio\\TestResults\\Deploy_Thomas H. Schmidt 2020-06-11 18_03_47\\Out"
 }
示例#3
0
        public void TestMultiPressEncoding7()    //
        {
            TestContext.WriteLine("TestMultiPressEncoding('0',0)");
            char c = MultiPress.Encoding('0', 0);

            TestContext.WriteLine("TestMultiPressEncoding('0',0) returned '{0}'", c);
            Assert.IsTrue(c == ' ');
        }
示例#4
0
 public void TestCreateMultiPressCommands4()     // string longer 10 chars
 {
     TestContext.WriteLine("CreateMultiPressCommands('abcdefghijklm')");
     MultiPressCommand[] mpc = MultiPress.CreateMultiPressCommands("abcdefghijklm");  // 13 chars
     Assert.IsTrue(mpc.Length == 10);
     mpc.Should().BeEquivalentTo(Expected4);
     for (int i = 0; i < mpc.Length; i++)
     {
         TestContext.WriteLine("{0}", mpc[i]);
     }
 }
示例#5
0
 public void TestCreateMultiPressCommands5()    // string ABC
 {
     TestContext.WriteLine("CreateMultiPressCommands('ABC')");
     MultiPressCommand[] mpc = MultiPress.CreateMultiPressCommands("ABC");
     Assert.IsTrue(mpc.Length == 3);
     for (int i = 0; i < mpc.Length; i++)
     {
         TestContext.WriteLine("{0}", mpc[i]);
     }
     mpc.Should().BeEquivalentTo(Expected5);
 }
示例#6
0
 public void TestCreateMultiPressCommands3()    // string with invalid char ß
 {
     MultiPressCommand[] mpc = MultiPress.CreateMultiPressCommands("aßc");
     Assert.IsTrue(mpc.Length == 2);
     mpc.Should().BeEquivalentTo(Expected3);
 }