예제 #1
0
        public void Set_ExistingParameter_ParameterShouldHaveNewValue()
        {
            SymCommand cmd = SymCommand.Parse("CommandMessage~Parameter1=Value");

            cmd.Set("Parameter1", "NewValue");
            cmd.Parameters["Parameter1"].Should().Be("NewValue");
        }
예제 #2
0
        public void ToString_WithNoAddedParameters_ShouldBeCorrect()
        {
            SymCommand cmd = SymCommand.Parse("CommandMessage");

            cmd.ToString().Should().Contain("CommandMessage");
        }
예제 #3
0
        public void ToString_WithAddedParameterMissingValue_ShouldBeCorrect()
        {
            SymCommand cmd = SymCommand.Parse("CommandMessage~Parameter1");

            cmd.ToString().Should().Contain("Parameter1");
        }
예제 #4
0
        public void Parse_WithParameter_ShouldHaveTheSpecifiedParameter()
        {
            SymCommand cmd = SymCommand.Parse("CommandMessage~Parameter1=RandomValue");

            cmd.HasParameter("Parameter1").Should().BeTrue();
        }
예제 #5
0
        public void Parse_WithParameter_ShouldHaveEmptyData()
        {
            SymCommand cmd = SymCommand.Parse("CommandMessage");

            cmd.Data.Should().BeNullOrEmpty();
        }
예제 #6
0
        public void Parse_WithParameter_ShouldHaveTheCorrectParameterValue()
        {
            SymCommand cmd = SymCommand.Parse("CommandMessage~Parameter1=RandomValue");

            cmd.Get("Parameter1").Should().Be("RandomValue");
        }
예제 #7
0
        public void Parse_WithParameter_ShouldHave2Parameters()
        {
            SymCommand cmd = SymCommand.Parse("CommandMessage~Parameter1=RandomValue");

            cmd.Parameters.Count.Should().Be(2);
        }
예제 #8
0
        public void Parse_WithParameter_ShouldHaveCorrectCommand()
        {
            SymCommand cmd = SymCommand.Parse("CommandMessage~Parameter1=RandomValue");

            cmd.Command.Should().Be("CommandMessage");
        }
예제 #9
0
        public void Parse_WithParameterWithNoValue_ShouldHaveParameterValueBlank()
        {
            SymCommand cmd = SymCommand.Parse("CommandMessage~Parameter1");

            cmd.Get("Parameter1").Should().BeNullOrEmpty();
        }
예제 #10
0
        public void Parse_WithParameterWithNoValue_ShouldHaveParameter()
        {
            SymCommand cmd = SymCommand.Parse("CommandMessage~Parameter1");

            cmd.HasParameter("Parameter1").Should().BeTrue();
        }
예제 #11
0
        public void Parse_WithNoTildes_ShouldHaveHaveOneParameter()
        {
            SymCommand cmd = SymCommand.Parse("CommandMessage");

            cmd.Parameters.Count.Should().Be(1);
        }
예제 #12
0
        public void Parse_WithNoTildes_ShouldHaveHaveBlankData()
        {
            SymCommand cmd = SymCommand.Parse("CommandMessage");

            cmd.Data.Should().BeNullOrEmpty();
        }
예제 #13
0
        public void Parse_WithNoTildes_ShouldHaveCorrectCommand()
        {
            SymCommand cmd = SymCommand.Parse("CommandMessage");

            cmd.Command.Should().Be("CommandMessage");
        }