Exemple #1
0
        public void GetTest2()
        {
            UserVariableAccessor target = new UserVariableAccessor();
            string name    = "name";
            string project = "project";

            target.SetVariable(name, project, "val");
            Assert.Equal(String.Empty, target.GetValue(target.DefIndex(name, project)));
        }
Exemple #2
0
        public void IsExistTest4()
        {
            UserVariableAccessor target = new UserVariableAccessor();
            string name    = "name";
            string project = "project";

            target.SetVariable(name, project, "val");
            Assert.True(target.IsExist(target.DefIndex(name, project)));
        }
Exemple #3
0
        public void SetTest2()
        {
            UserVariableAccessor target = new UserVariableAccessor();
            string name    = "name";
            string project = "project";

            target.SetVariable(name, project, "unevaluated");

            Assert.Single(target.Definitions);

            foreach (string v in target.Definitions)
            {
                Assert.Equal(v, target.DefIndex(name, project));
            }
        }
Exemple #4
0
        public void SetTest4()
        {
            UserVariableAccessor target = new UserVariableAccessor();
            string name    = "name";
            string project = "project";

            target.SetVariable(name, project, "unevaluated");
            Assert.Single(target.Variables);

            foreach (TVariable v in target.Variables)
            {
                Assert.Null(v.evaluated);
                Assert.Equal(target.DefIndex(name, project), v.ident);
                Assert.False(v.persistence);
                Assert.Equal(new TVariable(), v.prev);
                Assert.Equal(ValStatus.Unevaluated, v.status);
                Assert.Equal("unevaluated", v.unevaluated);
            }
        }