public void GetAdjustmentChain_Can_Seek_Duplicate_Frequencies() { // first recurring value should be 1 (0+1=1, 1+2=3, 3-2=1) var adjustments = new List <FrequencyAdjustment>() { new FrequencyAdjustment("+1"), new FrequencyAdjustment("+2"), new FrequencyAdjustment("-2"), new FrequencyAdjustment("+3") }; Assert.AreEqual(1, FrequencyCalibratorLauncher.GetAdjustmentChain(adjustments, true).Last()); }
public void GetAdjustmentChain_Aggregates_Adjustments() { var adjustments = new List <FrequencyAdjustment>() { new FrequencyAdjustment("+1"), new FrequencyAdjustment("-2"), new FrequencyAdjustment("+0"), new FrequencyAdjustment("-0"), new FrequencyAdjustment("+1000"), new FrequencyAdjustment("-999"), }; Assert.AreEqual(0, FrequencyCalibratorLauncher.GetAdjustmentChain(adjustments).Last()); }