Exemplo n.º 1
0
        public void Set_ExistingParameter_ParameterShouldHaveNewValue()
        {
            SymCommand cmd = SymCommand.Parse("CommandMessage~Parameter1=Value");

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

            cmd.ToString().Should().Contain("CommandMessage");
        }
Exemplo n.º 3
0
        public void ToString_WithAddedParameterMissingValue_ShouldBeCorrect()
        {
            SymCommand cmd = SymCommand.Parse("CommandMessage~Parameter1");

            cmd.ToString().Should().Contain("Parameter1");
        }
Exemplo n.º 4
0
        public void Parse_WithParameter_ShouldHaveTheSpecifiedParameter()
        {
            SymCommand cmd = SymCommand.Parse("CommandMessage~Parameter1=RandomValue");

            cmd.HasParameter("Parameter1").Should().BeTrue();
        }
Exemplo n.º 5
0
        public void Parse_WithParameter_ShouldHaveEmptyData()
        {
            SymCommand cmd = SymCommand.Parse("CommandMessage");

            cmd.Data.Should().BeNullOrEmpty();
        }
Exemplo n.º 6
0
        public void Parse_WithParameter_ShouldHaveTheCorrectParameterValue()
        {
            SymCommand cmd = SymCommand.Parse("CommandMessage~Parameter1=RandomValue");

            cmd.Get("Parameter1").Should().Be("RandomValue");
        }
Exemplo n.º 7
0
        public void Parse_WithParameter_ShouldHave2Parameters()
        {
            SymCommand cmd = SymCommand.Parse("CommandMessage~Parameter1=RandomValue");

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

            cmd.Command.Should().Be("CommandMessage");
        }
Exemplo n.º 9
0
        public void Parse_WithParameterWithNoValue_ShouldHaveParameterValueBlank()
        {
            SymCommand cmd = SymCommand.Parse("CommandMessage~Parameter1");

            cmd.Get("Parameter1").Should().BeNullOrEmpty();
        }
Exemplo n.º 10
0
        public void Parse_WithParameterWithNoValue_ShouldHaveParameter()
        {
            SymCommand cmd = SymCommand.Parse("CommandMessage~Parameter1");

            cmd.HasParameter("Parameter1").Should().BeTrue();
        }
Exemplo n.º 11
0
        public void Parse_WithNoTildes_ShouldHaveHaveOneParameter()
        {
            SymCommand cmd = SymCommand.Parse("CommandMessage");

            cmd.Parameters.Count.Should().Be(1);
        }
Exemplo n.º 12
0
        public void Parse_WithNoTildes_ShouldHaveHaveBlankData()
        {
            SymCommand cmd = SymCommand.Parse("CommandMessage");

            cmd.Data.Should().BeNullOrEmpty();
        }
Exemplo n.º 13
0
        public void Parse_WithNoTildes_ShouldHaveCorrectCommand()
        {
            SymCommand cmd = SymCommand.Parse("CommandMessage");

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