public void ReturnsNameField(TmStatus status) { var sb = "Name=Выключатель"; status.SetTmcObjectProperties(sb); status.Name.Should().Be("Выключатель"); }
public void SetsCorrectDuplicateKeys(TmStatus status) { var sb = "A=1\r\nA=2\r\nA=3"; status.SetTmcObjectProperties(sb); status.Properties.Should().ContainKeys("A", "A_1", "A_2"); }
public void SetsCorrectNormalStatusToStatus(short normalStatus, short expectedNormalStatus, TmStatus status) { var sb = $"Normal={normalStatus}"; status.SetTmcObjectProperties(sb); status.NormalStatus.Should().Be(expectedNormalStatus); }
public void SetsCorrectImportanceToStatus(short importance, TmStatus status) { var sb = $"Importance={importance}"; status.SetTmcObjectProperties(sb); status.Importance.Should().Be(importance); }
public void SetsCorrectValuesToStatus(TmStatus status) { var sb = "Key1=Value1\r\nKey2=0\r\nName=Выключатель"; status.SetTmcObjectProperties(sb); status.Name.Should().Be("Выключатель"); status.Properties.Should().Equal(new Dictionary <string, string> { { "Key1", "Value1" }, { "Key2", "0" }, { "Name", "Выключатель" }, }); }
public void ReturnsFalseForTmStatus(string properties, TmStatus status) { status.SetTmcObjectProperties(properties); status.HasTmProvider.Should().BeFalse(); }
public void ReturnsTrueForTmStatus(TmStatus status) { status.SetTmcObjectProperties("Provider=123"); status.HasTmProvider.Should().BeTrue(); }