Пример #1
0
 public void ConsoleBufferChar_equals_test()
 {
     var ch1 = new ConsoleBufferChar {Char = ' ', ForegroundColor = ConsoleColor.Blue, BackgroundColor = ConsoleColor.Cyan};
     var ch2 = new ConsoleBufferChar {Char = ' ', ForegroundColor = ConsoleColor.Blue, BackgroundColor = ConsoleColor.Cyan};
     Assert.IsTrue(ch1 == ch2);
     Assert.IsTrue(ch1.GetHashCode() == ch2.GetHashCode());
 }
Пример #2
0
 public void ConsoleBufferChar_not_equals_test()
 {
     var ch1 = new ConsoleBufferChar { Char = ' ', ForegroundColor = ConsoleColor.Blue, BackgroundColor = ConsoleColor.Cyan };
     var ch2 = new ConsoleBufferChar { Char = '1', ForegroundColor = ConsoleColor.Blue, BackgroundColor = ConsoleColor.Cyan };
     Assert.IsTrue(ch1 != ch2);
     Assert.IsTrue(ch1.GetHashCode() != ch2.GetHashCode());
     // ReSharper disable once SuspiciousTypeConversion.Global
     Assert.IsFalse(ch1.Equals(""));
 }