Beispiel #1
0
        public void GetNamesWhenEmpty()
        {
            Context context = new Context();
            var result = context.GetNames();

            Assert.IsNotNull(result);
            Assert.AreEqual(0, result.Count);
        }
Beispiel #2
0
        public void GetNamesWhenTwoValuesAreDefined()
        {
            Context context = new Context();
            context.SetValue("One", 1);
            context.SetValue("Two", 2);

            var result = context.GetNames();

            Assert.IsNotNull(result);
            Assert.AreEqual(2, result.Count);
            Assert.IsTrue(result.Contains("One"));
            Assert.IsTrue(result.Contains("Two"));
        }
Beispiel #3
0
        public void GetNames()
        {
            Context context = new Context();
            context.DefineVariable("a");
            context.DefineVariable("b");
            context.DefineVariable("c");

            var names = context.GetNames();

            Assert.IsNotNull(names);
            Assert.AreEqual(3, names.Count);
            Assert.IsTrue(names.Contains("a"));
            Assert.IsTrue(names.Contains("b"));
            Assert.IsTrue(names.Contains("c"));
        }