public void TestToStringForUnsigned() { GraphCommand command = new GraphCommand(GraphCommand.Name.UndoOperation); command.AppendArgument("Math.Sin"); command.AppendArgument(12.34); command.AppendArgument((uint)5678); Assert.AreEqual("UndoOperation|s:Math.Sin|d:12.34|u:0x0000162e", command.ToString()); }
public void TestToStringWithLineBreak() { GraphCommand command = new GraphCommand(GraphCommand.Name.EndNodeEdit); command.AppendArgument((uint)0x10000001); command.AppendArgument("a=3;\nb=4;"); command.AppendArgument(true); Assert.AreEqual("EndNodeEdit|u:0x10000001|s:a=3;\\nb=4;|b:True", command.ToString()); }
public void TestToStringForEnum() { GraphCommand command = new GraphCommand(GraphCommand.Name.UndoOperation); command.AppendArgument(NodeType.Function); command.AppendArgument("Math.Sin"); command.AppendArgument(12.34); command.AppendArgument(56.78); Assert.AreEqual("UndoOperation|e:DesignScriptStudio.Graph.Core.NodeType,Function|s:Math.Sin|d:12.34|d:56.78", command.ToString()); }
public void TestToStringWithArguments() { GraphCommand command = new GraphCommand(GraphCommand.Name.UndoOperation); command.AppendArgument(1234); command.AppendArgument(56.78); command.AppendArgument(true); command.AppendArgument("DesignScript Rocks!"); Assert.AreEqual("UndoOperation|i:1234|d:56.78|b:True|s:DesignScript Rocks!", command.ToString()); }