public void TestDaytimerEntryParse() { var demoData = Automatica.Core.Driver.Utility.Utils.StringToByteArray("00000000770100002805000000000000000000000000F03F"); var entry = DaytimerEntry.Parse(demoData); Assert.NotNull(entry); Assert.Equal(375, entry.From); Assert.Equal(0, entry.Mode); Assert.Equal(0, entry.NeedActivate); Assert.Equal(1320, entry.To); Assert.Equal(1, entry.Value); }
public void TestDaytimerEntryParseFail2() { var demoData = Automatica.Core.Driver.Utility.Utils.StringToByteArray("770100002805000000000000000000000000F03F"); Assert.Throws <ArgumentException>(() => DaytimerEntry.Parse(demoData)); }