public void ResetsProperly() { var sak = new SwissArmyKnife(4, 0.1, SwissArmyKnifeTool.BandPass); foreach (var data in TestHelper.GetDataStream(5)) { sak.Update(data); } Assert.IsTrue(sak.IsReady); Assert.AreNotEqual(0m, sak.Current.Value); Assert.AreNotEqual(0, sak.Samples); sak.Reset(); TestHelper.AssertIndicatorIsInDefaultState(sak); }
public void ComparesGaussAgainstExternalData() { var indicator = new SwissArmyKnife("", 20, 0.1, SwissArmyKnifeTool.Gauss); RunTestIndicator(indicator, "Gauss", 0.01m); }
public void ComparesButterAgainstExternalData() { var indicator = new SwissArmyKnife("", 20, 0.1, SwissArmyKnifeTool.Butter); RunTestIndicator(indicator, "Butter", 0.01m); }
public void ComparesHPAgainstExternalData() { var indicator = new SwissArmyKnife("", 20, 0.1, SwissArmyKnifeTool.HighPass); RunTestIndicator(indicator, "HP", 0.01m); }
public void ComparesBandPassAgainstExternalData() { var indicator = new SwissArmyKnife("", 20, 0.1, SwissArmyKnifeTool.BandPass); RunTestIndicator(indicator, "BP", 0.043m); }