コード例 #1
0
        public void UpdateStation_ThatExistsInSystem()
        {
            var mockRadio = new Mock <IRadio>();

            mockRadio.Object.IsOn = true;
            mockRadio.Setup(x => x.UpdateChannelData(IStreamable.IStreamableBasicConstructor(), "", ""));
            Assert.That(mockRadio.Object.AllStations.Count, Is.EqualTo(4));
        }
コード例 #2
0
 public void UpdateStation_ThatDoesNotExistInSystem()
 {
     Assert.That(() => _radio.UpdateChannelData(IStreamable.IStreamableBasicConstructor(), "newName", "newUrl"), Throws.Exception.With.Message.EqualTo("The old station entry could not be found"));
 }