public void IntegrityTest()
{
ContextStack stack = new ContextStack();
string one = "one";
string two = "two";
stack.Push(two);
stack.Push(one);
Assert.Same(one, stack[typeof(string)]);
Assert.Same(one, stack[0]);
Assert.Same(one, stack.Current);
Assert.Same(one, stack.Pop());
Assert.Same(two, stack[typeof(string)]);
Assert.Same(two, stack[0]);
Assert.Same(two, stack.Current);
string three = "three";
stack.Append(three);
Assert.Same(two, stack[typeof(string)]);
Assert.Same(two, stack[0]);
Assert.Same(two, stack.Current);
Assert.Same(two, stack.Pop());
Assert.Same(three, stack[typeof(string)]);
Assert.Same(three, stack[0]);
Assert.Same(three, stack.Current);
Assert.Same(three, stack.Pop());
Assert.Null(stack.Pop());
Assert.Null(stack.Current);
}