public void InvalidCriteriaTest() { Assert.ThrowsException <ArgumentOutOfRangeException>( //instantiate a DirectionLoader where the criteria parameter () => DirectionLoader.GetDirectionNumberLoader("8") ); }
public void NoMoreDirectionTest() { DirectionLoader.DirectionNumberLoader dnl = DirectionLoader.GetDirectionNumberLoader("5"); //Test wether DirectionLoader throw an error when it arrive at the endofstream Assert.ThrowsException <ArgumentOutOfRangeException>( () => GetAllDirections(dnl) ); }
public void DirectionTest() { DirectionLoader.DirectionNumberLoader dnl = DirectionLoader.GetDirectionNumberLoader("6"); for (int i = 0; i < 10; i++) { Direction dir = dnl.Next(); Console.Write(dir.d + " " + dir.s + " " + dir.a + " "); for (int k = 0; k < dir.v.Length; k++) { Console.Write(dir.v[k] + " "); } Console.WriteLine(); } }