Esempio n. 1
0
        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);
        }
Esempio n. 2
0
 public void ComparesGaussAgainstExternalData()
 {
     var indicator = new SwissArmyKnife("", 20, 0.1, SwissArmyKnifeTool.Gauss);
     RunTestIndicator(indicator, "Gauss", 0.01m);
 }
Esempio n. 3
0
 public void ComparesButterAgainstExternalData()
 {
     var indicator = new SwissArmyKnife("", 20, 0.1, SwissArmyKnifeTool.Butter);
     RunTestIndicator(indicator, "Butter", 0.01m);
 }
Esempio n. 4
0
 public void ComparesHPAgainstExternalData()
 {
     var indicator = new SwissArmyKnife("", 20, 0.1, SwissArmyKnifeTool.HighPass);
     RunTestIndicator(indicator, "HP", 0.01m);
 }
Esempio n. 5
0
 public void ComparesBandPassAgainstExternalData()
 {
     var indicator = new SwissArmyKnife("", 20, 0.1, SwissArmyKnifeTool.BandPass);
     RunTestIndicator(indicator, "BP", 0.043m);
 }