public void LessThen1_ThrowException(int n) { var fizzBuzzService = new FizzBuzzService(); var ex = Assert.Throws <ArgumentException>(() => { fizzBuzzService.GetWord(n); }); Assert.Contains("は1以上としてください", ex.Message); }
public void ReturnsValidString(int n, string word) { var fizzBuzzService = new FizzBuzzService(); Assert.Equal(word, fizzBuzzService.GetWord(n)); }