Example #1
0
        public void TestEachFuncIsNotNull()
        {
            Vec2 start = new Vec2(2, 3);
            Vec2 result;

            Assert.Throws <ArgumentNullException>(() => result = start.Each(null));
        }
Example #2
0
        public void TestEach()
        {
            Vec2 start  = new Vec2(2, 3);
            Vec2 result = start.Each((coord) => coord + 2);

            Assert.AreEqual(new Vec2(2, 3), start);
            Assert.AreEqual(new Vec2(4, 5), result);
        }