示例#1
0
        public void EmptyStationAreEqualTest()
        {
            IStreamable s1 = IRadio.MakeStation();
            IStreamable s2 = IRadio.MakeStation();

            bool result = s1.Equals(s2);

            Assert.AreEqual(result, true);
        }
示例#2
0
        public void StationObjectAreEqualTest()
        {
            IStreamable s1 = IRadio.MakeStation("Station 1", "Best radio station eva", "radio.com");
            IStreamable s2 = IRadio.MakeStation("Station 1", "Best radio station eva", "radio.com");

            bool result = s1.Equals(s2);

            Assert.AreEqual(result, true);
        }
示例#3
0
 private void quickPlayButton_Click(object sender, RoutedEventArgs e)
 {
     if (nameTextBox.Text != "" && urlTextBox.Text != "")
     {
         IStreamable quickPlayStation = IRadio.MakeStation("", nameTextBox.Text, urlTextBox.Text);
         _mainWindow.PlayStation(quickPlayStation);
         Close();
     }
 }
示例#4
0
        public void StationCreation_HasCorrect_Url()
        {
            IStreamable result = IRadio.MakeStation("stationID", "stationName", "https://stationURL.com/");

            Assert.That(result.URL.ToString(), Is.EqualTo("https://stationurl.com/"));
        }
示例#5
0
        public void StationCreation_HasCorrect_Name()
        {
            IStreamable result = IRadio.MakeStation("stationID", "stationName", "https://stationURL.com/");

            Assert.That(result.Name, Is.EqualTo("stationName"));
        }
示例#6
0
        public void DefaultStationCreation_HasCorrect_Name()
        {
            IStreamable result = IRadio.MakeStation();

            Assert.That(result.Name, Is.EqualTo(""));
        }