Exemplo n.º 1
0
        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);
        }
Exemplo n.º 2
0
 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;
 }