//dstockwe 2014/11/20 /// <summary> /// Set MultiTone chirp frequency sweep /// </summary> public void SetMultiToneChirpFrequencySweep(IAWG awg, ChirpFrequencySweep frequencySweep) { var typeSetting = ""; switch (frequencySweep) { case ChirpFrequencySweep.LowHigh: typeSetting = SyntaxForFrequencySweepLowHigh; break; case ChirpFrequencySweep.HighLow: typeSetting = SyntaxForFrequencySweepHighLow; break; } awg.SetMultiToneChirpFrequencySweep(typeSetting); }
/// <summary> /// Compare actual to expected and report /// </summary> /// <param name="awg"></param> /// <param name="expectedState"></param> public void MultiToneFrequencySweepShouldBe(IAWG awg, ChirpFrequencySweep expectedState) { var expectedSetting = ""; var actualSetting = awg.MultiToneChirpFrequencySweep; switch (expectedState) { case ChirpFrequencySweep.HighLow: expectedSetting = SyntaxForFrequencySweepHighLow; break; case ChirpFrequencySweep.LowHigh: expectedSetting = SyntaxForFrequencySweepLowHigh; break; } var possibleErrorString = "Expected: " + expectedSetting + " Actual: " + actualSetting; Assert.AreEqual(expectedSetting, actualSetting, possibleErrorString); }