Пример #1
0
 @Test
 public void testInterfaceTrust0() {
   Stamp notTrusted =
       StampFactory.object(
           TypeReference.createWithoutAssumptions(getMetaAccess().lookupJavaType(I.class)));
   Assert.assertEquals(StampFactory.object(), notTrusted);
 }
Пример #2
0
 @Test
 public void testInterfaceTrust1() {
   Stamp trusted = StampFactory.object(getType(TrustedI.class));
   Assert.assertNotEquals(StampFactory.object(), trusted);
   Assert.assertTrue("Should be an AbstractObjectStamp", trusted instanceof AbstractObjectStamp);
   AbstractObjectStamp trustedObjectStamp = (AbstractObjectStamp) trusted;
   Assert.assertNotNull(trustedObjectStamp.type());
   Assert.assertTrue("Should be an interface", trustedObjectStamp.type().isInterface());
 }