public void GetOrSelfWithExistentKeyFromDictionaryParametersReturnsValue() { // Arrange var keyName = "arbitrary-key"; var value = "some-arbitrary-string"; var sut = new DictionaryParameters { { keyName, value } }; // Act var result = (string)sut.GetOrSelf(keyName); // Assert Assert.AreEqual(value, result); }
public void GetOrSelfWithInexistentKeyFromDictionaryParametersReturnsDefaultValue() { // Arrange var keyName = "arbitrary-key"; var value = "some-arbitrary-string"; var sut = new DictionaryParameters { { keyName, value } }; // Act var result = sut.GetOrSelf("inexistent-key-name"); // Assert Assert.AreEqual(sut, result); }