public string[] GetChannels() { if (Channel == null) { return(new string[0]); } return(Settings.GetChannels()); }
public void GetChannelsTest() { using (TestFile testFile = new TestFile("[Test1Settings]\r\n[Test2Settings]\r\n[Test3Settings]\r\n[Test4Settings]\r\n[Settings]\r\n[UpdateState]")) { UpdateSettings settings = new UpdateSettings(StoreType.Ini, testFile.FileName); var channels = settings.GetChannels(); Assert.AreEqual(5, channels.Length); Assert.AreEqual("Test1", channels[0]); Assert.AreEqual(string.Empty, channels[4]); } }