Example #1
0
        public void ModifyContent_WithValid_ReturnsString(string toRemove, string toModify, string expected)
        {
            var action = new RemoveStringContentAction(toRemove);
            var result = action.ModifyContent(toModify);

            Assert.Equal(expected, result);
        }
Example #2
0
        public void ModifyContent_WithEmptyToReplace_ThrowsArgumentException()
        {
            var action = new RemoveStringContentAction("");

            Assert.Throws <ArgumentException>(() => action.ModifyContent("[Example String]"));
        }
Example #3
0
        public void ModifyContent_WithNullParameter_ThrowsArgumentException()
        {
            var action = new RemoveStringContentAction(null);

            Assert.Throws <ArgumentException>(() => action.ModifyContent("[Example String]"));
        }