Ejemplo n.º 1
0
        public void NotTypeEmptyStringValue(string value)
        {
            // Arrange
            var line = new InMemoryLineView();

            // Act
            line.Type(value);

            // Assert
            Assert.Equal("", line.ToString());
        }
Ejemplo n.º 2
0
        public void ReturnValidStringStartedAtWithLength(
            string startValue, int start, int length, string expected)
        {
            // Arrange
            var line = new InMemoryLineView();

            line.Type(startValue);

            // Act
            string actual = line.ToString(start, length);

            // Assert
            Assert.Equal(expected, actual);
        }
Ejemplo n.º 3
0
        public void ReturnValidString()
        {
            // Arrange
            var    line     = new InMemoryLineView();
            string expected = "test";

            line.Type(expected);

            // Act
            string actual = line.ToString();

            // Assert
            Assert.Equal(expected, actual);
        }
Ejemplo n.º 4
0
        public void Clear(string startValue)
        {
            // Arrange
            var line = new InMemoryLineView();

            line.Type(startValue);

            // Act
            line.Clear();

            // Assert
            Assert.Equal("", line.ToString());
            Assert.Equal(0, line.Position);
        }
Ejemplo n.º 5
0
        public void TypeCharValue(string startValue, int startPos,
                                  char value, string expextedValue, int expextedPos)
        {
            // Arrange
            var line = new InMemoryLineView();

            line.Type(startValue);
            line.MoveTo(startPos);

            // Act
            line.Type(value);

            // Assert
            Assert.Equal(expextedValue, line.ToString());
            Assert.Equal(expextedPos, line.Position);
        }
Ejemplo n.º 6
0
        public void Delete(string startValue, int startPos,
                           int deleteCount, string expextedValue, int expextedPos)
        {
            // Arrange
            var line = new InMemoryLineView();

            line.Type(startValue);
            line.MoveTo(startPos);

            // Act
            line.Delete(deleteCount);

            // Assert
            Assert.Equal(expextedValue, line.ToString());
            Assert.Equal(expextedPos, line.Position);
        }