public void GetValueOrThrow_WhenKeyDoesNotExist_Throws() { var exception = Assert.Throws <SignatureException>( () => KeyPairFileUtility.GetValueOrThrow(_dictionary, key: "c")); Assert.Equal(NuGetLogCode.NU3000, exception.Code); Assert.Equal("Missing expected key: c", exception.Message); }
public void GetValueOrThrow_WhenKeyExists_ReturnsValue() { var value = KeyPairFileUtility.GetValueOrThrow(_dictionary, key: "a"); Assert.Equal("b", value); }