public void GetPhrase_PhraseNotPresent_ReturnsPhraseKey() { // arrange var sut = new PhraseDictionary(); // act var result = sut.GetPhrase("invalid phrase", "en"); // assert Assert.Equal("invalid phrase", result); }
public void GetPhrase_PhraseKeyIsNull_ThrowsException() { // arrange var sut = new PhraseDictionary(); Action sutAction = () => sut.GetPhrase(null, "en"); // act, assert var ex = Assert.Throws <ArgumentNullException>(sutAction); Assert.Equal("phraseKey", ex.ParamName); }
public void GetPhrase_PhraseKeyIsValid_ReturnsPhrase(string key, string expected) { // arrange var sut = new PhraseDictionary(); // act var result = sut.GetPhrase(key, "en"); // assert Assert.Equal(expected, result); }