public void ParseCause(Exception param, DracoonCryptoCode expected) { // ARRANGE // ACT DracoonCryptoCode actual = CryptoErrorMapper.ParseCause(param); // ASSERT Assert.Equal(expected.Code, actual.Code); Assert.Equal(expected.Text, actual.Text); }
public void DracoonCryptoException_Constructor2() { // ARRANGE DracoonCryptoCode code = DracoonCryptoCode.INTERNAL_ERROR; // ACT DracoonCryptoException exc = new DracoonCryptoException(code); // ASSERT Assert.IsAssignableFrom <DracoonException>(exc); Assert.IsAssignableFrom <Exception>(exc); Assert.Equal(code.Code, exc.ErrorCode.Code); }
public void DracoonCryptoException_Constructor3() { // ARRANGE DracoonCryptoCode code = DracoonCryptoCode.INVALID_PASSWORD_ERROR; Exception cause = new Exception("A other message"); // ACT DracoonCryptoException exc = new DracoonCryptoException(code, cause); // ASSERT Assert.IsAssignableFrom <DracoonException>(exc); Assert.IsAssignableFrom <Exception>(exc); Assert.Equal(code.Code, exc.ErrorCode.Code); Assert.Equal(cause, exc.InnerException); }