Exemple #1
0
 public void GetAlternateTarget_ShouldWorkWithAllValues()
 {
     foreach (var cur in KeyInputUtil.AlternateKeyInputList)
     {
         Assert.IsTrue(KeyInputUtil.GetAlternateTarget(cur).IsSome());
     }
 }
Exemple #2
0
 public void AllAlternatesShouldEqualTheirTarget()
 {
     foreach (var cur in KeyInputUtil.AlternateKeyInputList)
     {
         var target = KeyInputUtil.GetAlternateTarget(cur).Value;
         Assert.AreEqual(target, cur);
         Assert.AreEqual(target.GetHashCode(), cur.GetHashCode());
     }
 }
Exemple #3
0
        public void VerifyAlternateKeyInputPairListIsComplete()
        {
            foreach (var cur in KeyInputUtil.AlternateKeyInputPairList)
            {
                var target    = cur.Item1;
                var alternate = cur.Item2;
                Assert.AreEqual(alternate, target.GetAlternate().Value);
                Assert.AreEqual(alternate, KeyInputUtil.GetAlternate(target).Value);
                Assert.AreEqual(target, KeyInputUtil.GetAlternateTarget(alternate).Value);
            }

            Assert.AreEqual(KeyInputUtil.AlternateKeyInputPairList.Count(), KeyInputUtil.AlternateKeyInputList.Count());
        }