public void TestStationaryPointCounter() { int maxstationarypoint = 1; EndCriteria ec = new EndCriteria(100, 1e-8, 100, maxstationarypoint); Assert.AreEqual(ec.maxStationaryPointIterations, maxstationarypoint); Assert.IsTrue(!ec.CheckStationaryPoint(1.0, 1.0)); Assert.AreEqual(ec.Criteria, EndCriteria.CriteriaType.None); Assert.IsTrue(ec.CheckStationaryPoint(1.0, 1.0)); Assert.AreEqual(ec.Criteria, EndCriteria.CriteriaType.StationaryPoint); ec.Reset(); Assert.AreEqual(ec.stationaryPointIterationsCounter, 0); Assert.IsTrue(!ec.CheckStationaryPoint(1.0, 1.0)); Assert.AreEqual(ec.Criteria, EndCriteria.CriteriaType.None); }