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

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

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