Exemple #1
0
 public void RequestForNotFoundFrequencyThrowsException() {
     TraceExecutingMethod();
     var toneSet = new NoteUtility(_toneProvider);
     try {
         toneSet.GetNoteElements(9999);
     }
     catch (ArgumentException ex) {
         Assert.AreEqual("[The frequency [9999] was not found in the set of available notes]", ex.Message);
         throw;
     }
 }
Exemple #2
0
 public void RequestForFrequencyC3ReturnsExpectedElements() {
     TraceExecutingMethod();
     var toneSet = new NoteUtility(_toneProvider);
     Assert.AreEqual("D", toneSet.GetNoteElements(TestFrequency).Note);
     Assert.AreEqual(3, toneSet.GetNoteElements(TestFrequency).Octave);
 }