[TestClass] public class StringHelperTest { [TestMethod] public void StringToArray_Value_Not_Valid_Should_Return_Exception() { var ex = Assert.ThrowsException<ArgumentException>(() => StringHelper.StringToArray(null, null)); Assert.IsTrue(ex.Message.Contains(ErrorStrings.Value_cannot_be_null_or_empty)); } [DataTestMethod] [DataRow(null)] [DataRow(new char[] { })] public void StringToArray_DelimitersChars_Not_Valid_Should_Return_Exception(char[] argument) { var ex = Assert.ThrowsException<ArgumentException>(() => StringHelper.StringToArray("asdf", argument)); Assert.IsTrue(ex.Message.Contains(ErrorStrings.Value_cannot_be_null_or_empty)); } }