Exemple #1
0
        public void RemoveValue()
        {
            var context = new TestContextBase();

            context.SetValue(new TestValueA());
            Assert.That(context.Values.Length, Is.EqualTo(1));
            Assert.That(context.RemoveValue <TestValueA>(), Is.True);
            Assert.That(context.Values.Length, Is.Zero);
            Assert.Throws <InvalidOperationException>(() => context.RemoveValue <object>());
        }
Exemple #2
0
        public void RemoveValue()
        {
            var context = new TestContextBase();

            context.SetValue(new TestValueA());
            Assert.That(context.Values.Length, Is.EqualTo(1));
            Assert.That(context.RemoveValue <TestValueA>(), Is.True);
            Assert.That(context.Values.Length, Is.Zero);
        }