public void TestFieldVariable_SetValueNoVariable() { Setup(); var fieldVar = new FieldVariable(null, "name1"); fieldVar.SetSourceBlock(MockBlock()); fieldVar.SetValue("id1"); Assert.AreEqual("id1", fieldVar.GetText()); Assert.AreEqual("id1", fieldVar.GetRealValue()); TearDown(); }
public void TestFieldVariable_SetValueMatchName() { Setup(); workspace.CreateVariable("name2", null, "id2"); var fieldVar = new FieldVariable(null, "name1"); fieldVar.SetSourceBlock(MockBlock()); fieldVar.SetValue("name2"); Assert.AreEqual("name2", fieldVar.GetText()); Assert.AreEqual("id2", fieldVar.GetRealValue()); TearDown(); }