Example #1
0
        public void CreateChangeBreakpointCommand()
        {
            // Arrange
            const int commandId    = 3;
            const int breakpointId = 5;

            // Act
            var changeBreakpointCommand = new ChangeBreakpointCommand(commandId, breakpointId);

            // Assert
            Assert.AreEqual(commandId, changeBreakpointCommand.Id);
            Assert.AreEqual(
                string.Format(
                    "{{\"command\":\"changebreakpoint\",\"seq\":{0},\"type\":\"request\",\"arguments\":{{\"breakpoint\":{1}}}}}",
                    commandId, breakpointId),
                changeBreakpointCommand.ToString());
        }
Example #2
0
        public void CreateChangeBreakpointCommandWithOptionalParameters()
        {
            // Arrange
            const int    commandId    = 3;
            const int    breakpointId = 5;
            const bool   enabled      = true;
            const string condition    = "value > 5";
            const int    ignoreCount  = 2;

            // Act
            var changeBreakpointCommand = new ChangeBreakpointCommand(commandId, breakpointId, enabled, condition, ignoreCount);

            // Assert
            Assert.AreEqual(commandId, changeBreakpointCommand.Id);
            Assert.AreEqual(
                string.Format(
                    "{{\"command\":\"changebreakpoint\",\"seq\":{0},\"type\":\"request\",\"arguments\":{{\"breakpoint\":{1},\"enabled\":{2},\"condition\":\"{3}\",\"ignoreCount\":{4}}}}}",
                    commandId, breakpointId, enabled.ToString().ToLower(CultureInfo.InvariantCulture), condition, ignoreCount),
                changeBreakpointCommand.ToString());
        }