public void SecurityStatusException_CodeAndMessage()
 {
     SECURITY_STATUS error = SECURITY_STATUS.NTE_BAD_DATA;
     var ex = new SecurityStatusException(error, "msg");
     Assert.Equal(error, ex.NativeErrorCode);
     Assert.Equal("msg", ex.Message);
 }
    public void SecurityStatusException_Error_Message()
    {
        SECURITY_STATUS error = SECURITY_STATUS.NTE_BAD_DATA;
        var ex = new SecurityStatusException(error);
#if DESKTOP
        Assert.Equal("Bad Data (SECURITY_STATUS error: NTE_BAD_DATA (0x80090005))", ex.Message);
#else
        Assert.Equal("SECURITY_STATUS error: NTE_BAD_DATA (0x80090005)", ex.Message);
#endif
    }
    public void SecurityStatusException_Success_Message()
    {
        SECURITY_STATUS error = SECURITY_STATUS.ERROR_SUCCESS;
        var ex = new SecurityStatusException(error);
#if DESKTOP
        Assert.Equal("The operation completed successfully (SECURITY_STATUS success: ERROR_SUCCESS (0x00000000))", ex.Message);
#else
        Assert.Equal("SECURITY_STATUS success: ERROR_SUCCESS (0x00000000)", ex.Message);
#endif
    }
 public void SecurityStatusException_MessageNotFound()
 {
     SECURITY_STATUS error = (SECURITY_STATUS)0xC1111111;
     var ex = new SecurityStatusException(error);
     Assert.Equal("SECURITY_STATUS error: 0xC1111111", ex.Message);
 }
 public void SecurityStatusException_NativeErrorCode()
 {
     SECURITY_STATUS error = SECURITY_STATUS.NTE_BAD_DATA;
     var ex = new SecurityStatusException(error);
     Assert.Equal(error, ex.NativeErrorCode);
 }