public void GetNumberSet_ReturnSingleNumberSet() { /**/ int expected = 6; var obj = new CapitaGenerator(); var numberSet = obj.GetNumberSet(); Assert.AreEqual(expected, numberSet.Count()); } /// <summary> /// a number set should have numbers between 1-49 /// </summary> [TestMethod()] public void GetNumberSet_NumbersStayWithinSpecifiedRange() { /**/ int min = 1; int max = 49; var obj = new CapitaGenerator(); var numberSet = obj.GetNumberSet().ToArray(); bool expected = false; bool actual = numberSet.Select(n => n).Where(x => x > max || x < min).Any(); Assert.AreEqual(expected, actual); }
public void GetNumberSet_ShouldContinNonRepeatingNumbers() { /**/ var obj = new CapitaGenerator(); var numberSet = obj.GetNumberSet().ToArray(); bool expected = false; bool actual = numberSet.GroupBy(x => x).Any(g => g.Count() > 1); Assert.AreEqual(expected, actual); }