예제 #1
0
        public void CreateValueFromExpressionWhenExpressionNotFound()
        {
            var value     = new RemoteValueFake("_myVar", "17");
            var exprValue = value.CreateValueFromExpression("name", "dummyExpression");

            Assert.That(exprValue.GetName(), Is.EqualTo(""));
            Assert.That(exprValue.GetDefaultValue(), Is.EqualTo(""));
            Assert.That(exprValue.GetError().Fail, Is.True);
        }
예제 #2
0
        public void CreateValueFromExpressionWhenExpressionFound()
        {
            var value = new RemoteValueFake("_myVar", "17");

            var exprValue = new RemoteValueFake("$23", "Q");

            exprValue.SetTypeInfo(new SbTypeStub("char", TypeFlags.IS_SCALAR));
            value.AddValueFromExpression("dummyExpression", exprValue);

            var exprResult = value.CreateValueFromExpression("exprName", "dummyExpression");

            Assert.That(exprResult.GetName(), Is.EqualTo("exprName"));
            Assert.That(exprResult.GetTypeName(), Is.EqualTo("char"));
            Assert.That(exprResult.GetDefaultValue(), Is.EqualTo("Q"));
        }