public void TestFieldVariable_Constructor() { var ws = new Workspace(); var fieldVar = new FieldVariable(null, "name1"); Assert.AreEqual("name1", fieldVar.GetText()); ws.Dispose(); }
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(); }