Ejemplo n.º 1
0
        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());
        }
Ejemplo n.º 2
0
        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());
        }
Ejemplo n.º 3
0
        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());
        }
Ejemplo n.º 4
0
        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());
        }
Ejemplo n.º 5
0
        public void TestToStringNoArgument()
        {
            GraphCommand command = new GraphCommand(GraphCommand.Name.UndoOperation);

            Assert.AreEqual("UndoOperation", command.ToString());
        }