public void PushTest_Max() { // Arrange var navi = new NavigationHistory(3); // Act for (int i = 0; i < navi.Capacity + 1; i++) { navi.PushPattern(new FirstPattern()); } // Assert Assert.AreEqual(navi.Count, 3); }
private void CreateNewPattern() { if (!_history.PushPattern(GeneratePattern())) { return; } ApplyResult(_history.GetCurrentPattern()); CheckMovable(); if (_history.Count == 1) { btnEdit.Visibility = Visibility.Visible; } txtbxResult.Text = "1"; txtMaxHistory.Text = "/ " + _history.Count; }