public void Decrypting_the_signatureString_returns_the_correct_state() { expectedState = new SignatureState("aKey", "aPassword", expiry); signatureState = signatureProvider.Parse(encryptedSignature); Assert.AreEqual(expectedState.Key, signatureState.Key); Assert.AreEqual(expectedState.Password, signatureState.Password); Assert.AreEqual(expectedState.ExpiryDate, signatureState.ExpiryDate); }
private SignatureState BuildState(string rawSignature) { var stateValues = rawSignature.Split(','); var ticks = Int64.Parse(stateValues[2]); var key = stateValues[0]; var password = stateValues[1]; var expiry = new DateTime(ticks); var state = new SignatureState(key, password, expiry); return state; }
protected override void When() { signatureState = signatureProvider.Parse(testSignatureString); }