public void SetsCorrectTeleregulationToAnalog(string code, TmTeleregulation expectedTeleregulation,
                                                          TmAnalog analog)
            {
                var sb = $"FBFlagsC={code}";

                analog.SetTmcObjectProperties(sb);

                analog.Teleregulation.Should().Be(expectedTeleregulation);
            }
            public void SetsCorrectFormatToAnalog(string format, byte expectedWidth, byte expectedPrecision,
                                                  TmAnalog analog)
            {
                var sb = $"Format={format}";

                analog.SetTmcObjectProperties(sb);

                analog.Width.Should().Be(expectedWidth);
                analog.Precision.Should().Be(expectedPrecision);
            }
            public void SetsCorrectValuesToAnalog(TmAnalog analog)
            {
                var sb = "Key1=Value1\r\nKey2=0\r\nName=Мощность\r\nUnits=МВт";

                analog.SetTmcObjectProperties(sb);

                analog.Name.Should().Be("Мощность");
                analog.Unit.Should().Be("МВт");
                analog.Properties.Should().Equal(new Dictionary <string, string>
                {
                    { "Key1", "Value1" },
                    { "Key2", "0" },
                    { "Name", "Мощность" },
                    { "Units", "МВт" },
                });
            }
            public void ReturnsTrueForTmAnalog(TmAnalog analog)
            {
                analog.SetTmcObjectProperties("Provider=123");

                analog.HasTmProvider.Should().BeTrue();
            }
            public void ReturnsFalseForTmAnalog(string properties, TmAnalog analog)
            {
                analog.SetTmcObjectProperties(properties);

                analog.HasTmProvider.Should().BeFalse();
            }