Exemple #1
0
            public void SetsCorrectValuesWithNoClass(string name, short classId, string text0, string text1, string textB,
                                                     string textM)
            {
                var tmStatus = new TmStatus(0, 1, 1);

                tmStatus.SetSqlPropertiesAndClassData(name, 0, -1, classId, text0, text1, textB, textM);

                Assert.Equal(name, tmStatus.Name);
                Assert.Null(tmStatus.ClassId);
                Assert.Equal("ОТКЛ", tmStatus.GetClassCaption(TmStatus.ClassCaption.Off));
                Assert.Equal("ВКЛ", tmStatus.GetClassCaption(TmStatus.ClassCaption.On));
            }
Exemple #2
0
            public void SetsCorrectValuesWithClass(string name, short classId, string text0, string text1, string textB,
                                                   string textM)
            {
                var tmStatus = new TmStatus(0, 1, 1);

                tmStatus.SetSqlPropertiesAndClassData(name, 0, -1, classId, text0, text1, textB, textM);

                Assert.Equal(name, tmStatus.Name);
                Assert.Equal((byte)classId, tmStatus.ClassId);
                Assert.Equal(text0, tmStatus.GetClassCaption(TmStatus.ClassCaption.Off));
                Assert.Equal(text1, tmStatus.GetClassCaption(TmStatus.ClassCaption.On));
                Assert.Equal(textB, tmStatus.GetClassCaption(TmStatus.ClassCaption.Break));
                Assert.Equal(textM, tmStatus.GetClassCaption(TmStatus.ClassCaption.Malfunction));
            }