public void FrequensyOfWords(string text) { foreach (var word in GenericsCollections.FrequencyOfWords(text)) { Console.WriteLine(word); } Assert.Pass(); }
public void Fibonacci_ReturnsFiboNumbersUntilMax(int max, int expected) { var fibo = GenericsCollections.Fibonacci(max); int maxElement = 0; while (fibo.MoveNext()) { maxElement = fibo.Current; Console.WriteLine(maxElement); } Assert.AreEqual(expected, maxElement); }
public void ReversePolishNotation_ExceptionTests(string input) { var exc = Assert.Throws <ArgumentException>(() => GenericsCollections.ReversePolishNotation(input)); Assert.AreEqual(typeof(ArgumentException), exc.GetType()); }
public int ReversePolishNotation_ReturnsTheResultOfMath(string input) => GenericsCollections.ReversePolishNotation(input);
public int BinarySearch_IntTests(int[] array, int element) => GenericsCollections.BinarySearch(array, element);
public int BinarySearch_ReturnsReqItemIndex_OrMinus1(object[] array, object element) => GenericsCollections.BinarySearch(array, element);