public void AlgoritmExceptionTest() { Assert.Throws <ArgumentNullException>(() => SearchExtension <int> .BinnarySearch(new List <int>(), 2)); Assert.Throws <ArgumentException>(() => SearchExtension <Book> .BinnarySearch(new List <Book> { new Book("name") }, new Book("name"))); }
public bool AlgoritmTest <T>(List <T> collection, T element) { return(SearchExtension <T> .BinnarySearch(collection, element)); }