public void Base64Encode_ValidInput_ExpectedResultReturned() { var cryptonator = new Base64Cryptonator(); const string expected = "dGVzdFN0cmluZzEyMw=="; var decoded = cryptonator.Encode("testString123"); Assert.AreEqual(decoded, expected); }
public void Base64Encode_ParameterEmpty_ExceptionThrown() { var cryptonator = new Base64Cryptonator(); Assert.Throws<ArgumentNullException>(() => cryptonator.Encode(string.Empty)); }
public void Base64Decode_ParameterNull_ExceptionThrown() { var cryptonator = new Base64Cryptonator(); Assert.Throws<ArgumentNullException>(() => cryptonator.Decode(null)); }