예제 #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);
        }
예제 #2
0
        public void ModifyContent_WithEmptyToReplace_ThrowsArgumentException()
        {
            var action = new RemoveStringContentAction("");

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

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