public void TestBinaryIntExist() { BinaryTreeSeach<int> tree = new BinaryTreeSeach<int>(); CompareInterface<int> comparator = new CompareInt(); tree.InsertElement(1, comparator); Assert.IsTrue(tree.ElementExist(1, comparator)); }
public void EnumeratorTestString2() { BinaryTreeSeach<string> tree = new BinaryTreeSeach<string>(); CompareInterface<string> comparator = new CompareString(); int count = 0; foreach (string i in tree) { ++count; } Assert.AreEqual(0, count); }
public void EnumeratorTestString() { BinaryTreeSeach<string> tree = new BinaryTreeSeach<string>(); CompareInterface<string> comparator = new CompareString(); tree.InsertElement("1", comparator); tree.InsertElement("2", comparator); int count = 0; foreach (string i in tree) ++count; Assert.AreEqual(2, count); }
public void EnumeratorTestInt2() { BinaryTreeSeach<int> tree = new BinaryTreeSeach<int>(); CompareInterface<int> comparator = new CompareInt(); int count = 0; foreach (int i in tree) { ++count; } Assert.AreEqual(0, count); }
public void EnumeratorTestInt() { BinaryTreeSeach<int> tree = new BinaryTreeSeach<int>(); CompareInterface<int> comparator = new CompareInt(); tree.InsertElement(1, comparator); tree.InsertElement(2, comparator); int count = 0; foreach (int i in tree) ++count; Assert.AreEqual(2, count); }
public void TestBinaryIntIsInsert() { BinaryTreeSeach<int> tree = new BinaryTreeSeach<int>(); CompareInterface<int> comparator = new CompareInt(); tree.InsertElement(1, comparator); Assert.IsFalse(tree.IsEmpty()); }
public void TestBinaryIntExistString() { BinaryTreeSeach<string> tree = new BinaryTreeSeach<string>(); CompareInterface<string> comparator = new CompareString(); tree.InsertElement("1", comparator); Assert.IsTrue(tree.ElementExist("1", comparator)); }
public void TestBinaryInt() { BinaryTreeSeach<int> tree = new BinaryTreeSeach<int>(); Assert.IsTrue(tree.IsEmpty()); }
public void TestBinarString() { BinaryTreeSeach<string> tree = new BinaryTreeSeach<string>(); Assert.IsTrue(tree.IsEmpty()); }
public void TestBinaryIntIsInsertString() { BinaryTreeSeach<string> tree = new BinaryTreeSeach<string>(); CompareInterface<string> comparator = new CompareString(); tree.InsertElement("1", comparator); Assert.IsFalse(tree.IsEmpty()); }