View Javadoc
1   package org.fourthline.cling.support.test.model;
2   
3   
4   import org.fourthline.cling.support.model.DIDLObject;
5   import org.testng.annotations.Test;
6   
7   import static org.testng.Assert.assertTrue;
8   
9   public class DIDLObjectTest {
10  
11      @Test
12      public void testHasPropertyWithNormalClass() {
13          DIDLObject didlObject = new DIDLObject() {
14  
15          };
16          DIDLObject.Property property = new DIDLObject.Property.UPNP.ACTOR();
17          didlObject.addProperty(property);
18          assertTrue(didlObject.hasProperty(DIDLObject.Property.UPNP.ACTOR.class));
19      }
20  
21      @Test
22      public void testHasPropertyWithAnonymousClass() {
23          DIDLObject didlObject = new DIDLObject() {
24  
25          };
26          DIDLObject.Property property = new DIDLObject.Property.UPNP.ACTOR() {
27  
28          };
29          didlObject.addProperty(property);
30          assertTrue(didlObject.hasProperty(DIDLObject.Property.UPNP.ACTOR.class));
31      }
32  
33  }