public void Reduce(string input, string charsToRemove, int expectedLength)
        {
            // Arrange
            var sut = new Polymer(input, charsToRemove.ToCharArray());

            // Act
            var result = sut.React();

            // Assert
            result.Should().Be(expectedLength);
        }
        public void React(string input, int expectedLength)
        {
            // Arrange
            var sut = new Polymer(input);

            // Act
            var result = sut.React();

            // Assert
            result.Should().Be(expectedLength);
        }
示例#3
0
        public void Case1()
        {
            // Arrange
            var polymerSequence = "aA";
            var polymer         = new Polymer(polymerSequence);

            // Act
            polymer.React();

            // Assert
            Assert.Empty(polymer.Sequence);
        }
示例#4
0
        public void Case5()
        {
            // Arrange
            var polymerSequence = "dabAcCaCBAcCcaDA";
            var polymer         = new Polymer(polymerSequence);

            // Act
            polymer.React();

            // Assert
            Assert.Equal("dabCBAcaDA", polymer.Sequence);
        }
示例#5
0
        public void Case4()
        {
            // Arrange
            var polymerSequence = "aabAAB";
            var polymer         = new Polymer(polymerSequence);

            // Act
            polymer.React();

            // Assert
            Assert.Equal(polymerSequence, polymer.Sequence);
        }
 public void Test1()
 {
     Assert.Equal("dabCBAcaDA", polymer.React());
 }