public void SetTest(T[] inputs) { var table = new SelfHashTable <T, T>(); foreach (var input in inputs) { table[input] = input; } Assert.AreEqual(inputs.Length, table.Count); Console.WriteLine($"入力:{inputs.Length}, 出力:{table.Count}"); }
public void GetExceptionTest(List <string> list, string nextValue, string expect) { var table = new SelfHashTable <string, string>(); foreach (var input in list) { table[input] = input; } Assert.That(() => { var x = table[nextValue]; }, Throws.Exception.With.Message.EqualTo(expect)); }
public void GetTest(T[] inputs) { var table = new SelfHashTable <T, T>(); foreach (var input in inputs) { table[input] = input; } foreach (var input in inputs) { var item = table[input]; Assert.AreEqual(input, item); Console.WriteLine($"{input},{item}"); } }