Esempio n. 1
0
 public void SampleTest()
 {
     Assert.IsTrue((new long[] { 10, 2 }).SequenceEqual(DivSeven.Seven(10)));
     Assert.IsTrue((new long[] { 28, 7 }).SequenceEqual(DivSeven.Seven(28)));
     Assert.IsTrue((new long[] { 47, 7 }).SequenceEqual(DivSeven.Seven(47)));
     Assert.IsTrue((new long[] { 21, 7 }).SequenceEqual(DivSeven.Seven(21)));
     Assert.IsTrue((new long[] { 7, 2 }).SequenceEqual(DivSeven.Seven(7)));
 }
Esempio n. 2
0
        public void RandomTest()
        {
            Random random = new Random();

            for (int i = 0; i < 1000; i++)
            {
                var n = random.Next(0, 1000);
                CollectionAssert.AreEqual(Solutions.DivSeven.Seven(n), DivSeven.Seven(n));
            }
        }