master
 1using System.Collections.Generic;
 2using System.Linq;
 3using MbUnit.Framework;
 4
 5namespace Notepad.Test.Extensions {
 6    public static class AssertionExtensions {
 7        public static void ShouldBeEqualTo<T>(this T itemToValidate, T expectedValue) {
 8            Assert.AreEqual(expectedValue, itemToValidate);
 9        }
10
11        public static void ShouldBeSameInstanceAs<T>(this T left, T right) {
12            Assert.IsTrue(ReferenceEquals(left, right));
13        }
14
15        public static void ShouldNotBeNull<T>(this T itemToCheck) where T : class {
16            Assert.IsNotNull(itemToCheck);
17        }
18
19        public static void ShouldBeGreaterThan(this int actual, int expected) {
20            Assert.GreaterThan(actual, expected);
21        }
22
23        public static void ShouldBeLessThan(this int actual, int expected) {
24            Assert.Less(actual, expected);
25        }
26
27        public static void ShouldContain<T>(this IEnumerable<T> itemsToPeekInto, T itemToLookFor) {
28            Assert.IsTrue(itemsToPeekInto.Contains(itemToLookFor));
29        }
30
31        public static void ShouldNotContain<T>(this IEnumerable<T> itemsToPeekInto, T itemToLookFor) {
32            Assert.IsFalse(itemsToPeekInto.Contains(itemToLookFor));
33        }
34    }
35}