public void Set_ExistingParameter_ParameterShouldHaveNewValue() { SymCommand cmd = SymCommand.Parse("CommandMessage~Parameter1=Value"); cmd.Set("Parameter1", "NewValue"); cmd.Parameters["Parameter1"].Should().Be("NewValue"); }
public void ToString_WithNoAddedParameters_ShouldBeCorrect() { SymCommand cmd = SymCommand.Parse("CommandMessage"); cmd.ToString().Should().Contain("CommandMessage"); }
public void ToString_WithAddedParameterMissingValue_ShouldBeCorrect() { SymCommand cmd = SymCommand.Parse("CommandMessage~Parameter1"); cmd.ToString().Should().Contain("Parameter1"); }
public void Parse_WithParameter_ShouldHaveTheSpecifiedParameter() { SymCommand cmd = SymCommand.Parse("CommandMessage~Parameter1=RandomValue"); cmd.HasParameter("Parameter1").Should().BeTrue(); }
public void Parse_WithParameter_ShouldHaveEmptyData() { SymCommand cmd = SymCommand.Parse("CommandMessage"); cmd.Data.Should().BeNullOrEmpty(); }
public void Parse_WithParameter_ShouldHaveTheCorrectParameterValue() { SymCommand cmd = SymCommand.Parse("CommandMessage~Parameter1=RandomValue"); cmd.Get("Parameter1").Should().Be("RandomValue"); }
public void Parse_WithParameter_ShouldHave2Parameters() { SymCommand cmd = SymCommand.Parse("CommandMessage~Parameter1=RandomValue"); cmd.Parameters.Count.Should().Be(2); }
public void Parse_WithParameter_ShouldHaveCorrectCommand() { SymCommand cmd = SymCommand.Parse("CommandMessage~Parameter1=RandomValue"); cmd.Command.Should().Be("CommandMessage"); }
public void Parse_WithParameterWithNoValue_ShouldHaveParameterValueBlank() { SymCommand cmd = SymCommand.Parse("CommandMessage~Parameter1"); cmd.Get("Parameter1").Should().BeNullOrEmpty(); }
public void Parse_WithParameterWithNoValue_ShouldHaveParameter() { SymCommand cmd = SymCommand.Parse("CommandMessage~Parameter1"); cmd.HasParameter("Parameter1").Should().BeTrue(); }
public void Parse_WithNoTildes_ShouldHaveHaveOneParameter() { SymCommand cmd = SymCommand.Parse("CommandMessage"); cmd.Parameters.Count.Should().Be(1); }
public void Parse_WithNoTildes_ShouldHaveHaveBlankData() { SymCommand cmd = SymCommand.Parse("CommandMessage"); cmd.Data.Should().BeNullOrEmpty(); }
public void Parse_WithNoTildes_ShouldHaveCorrectCommand() { SymCommand cmd = SymCommand.Parse("CommandMessage"); cmd.Command.Should().Be("CommandMessage"); }