﻿namespace BinaryPasswordsTests
{
    using System;
    using Microsoft.VisualStudio.TestTools.UnitTesting;

    using ZigZag;

    [TestClass]
    public class ZigZagTests
    {
        [TestMethod]
        public void TestIfCheckForZigZagMethodWorksWithSmallZigZag()
        {
            int[] arr = new int[] { 2, 0 };
            bool expected = true;

            bool actual = ZigZagFinder.CheckIfZigZag(arr);

            Assert.AreEqual(expected, actual);
        }

        [TestMethod]
        public void TestIfCheckForZigZagMethodWorksWithSmallNonZigZag()
        {
            int[] arr = new int[] { 1, 2 };
            bool expected = false;

            bool actual = ZigZagFinder.CheckIfZigZag(arr);

            Assert.AreEqual(expected, actual);
        }

        [TestMethod]
        public void TestIfCheckForZigZagMethodWorksWithBigZigZag()
        {
            int[] arr = new int[] { 1, 0, 3, 2 };
            bool expected = true;

            bool actual = ZigZagFinder.CheckIfZigZag(arr);

            Assert.AreEqual(expected, actual);
        }

        [TestMethod]
        public void TestIfCheckForZigZagMethodWorksWithBigNonZigZag()
        {
            int[] arr = new int[] { 1, 0, 3, 2, 1 };
            bool expected = false;

            bool actual = ZigZagFinder.CheckIfZigZag(arr);

            Assert.AreEqual(expected, actual);
        }
    }
}
