1112131415161718
public class HRESULTTest { @Test public void ObjectDeletedTest() { HResult hr = new HResult(-1610350078); assertTrue(hr.is_ITUNES_E_OBJECTDELETED()); }
1718192021222324
assertTrue(hr.is_ITUNES_E_OBJECTDELETED()); } @Test public void ObjectDeletedNegativeTest() { HResult hr = new HResult(12345678); assertFalse(hr.is_ITUNES_E_OBJECTDELETED()); }
2324252627282930
assertFalse(hr.is_ITUNES_E_OBJECTDELETED()); } @Test public void InvalidArgumentTest() { HResult hr = new HResult(-2147024809); assertTrue(hr.is_E_INVALIDARG()); }
2930313233343536
assertTrue(hr.is_E_INVALIDARG()); } @Test public void InvalidArgumentNegativeTest() { HResult hr = new HResult(12345678); assertFalse(hr.is_E_INVALIDARG()); }
3536373839404142
assertFalse(hr.is_E_INVALIDARG()); } @Test(expected = ITUNES_E_OBJECTDELETED.class) public void ObjectDeletedExceptionTest() { HResult hr = new HResult(-1610350078); throw hr.createException(); }
4142434445464748
throw hr.createException(); } @Test(expected = E_INVALIDARG.class) public void InvalidArgumentExceptionTest() { HResult hr = new HResult(-2147024809); throw hr.createException(); }