Package org.milyn.profile

Examples of org.milyn.profile.DefaultProfileStore


  public DefaultProfileStoreTest(String arg0) {
    super(arg0);
  }

  public void testAddGetProfileSet() {
    ProfileStore store = new DefaultProfileStore();
    DefaultProfileSet set1 = new DefaultProfileSet("device1");
    DefaultProfileSet set2 = new DefaultProfileSet("device2");

    try {
      DefaultProfileStore.UnitTest.addProfileSet(store, null);
      fail("no IllegalArgumentException on null devicename");
    } catch (IllegalArgumentException e) {
    }

    DefaultProfileStore.UnitTest.addProfileSet(store, set1);
    DefaultProfileStore.UnitTest.addProfileSet(store, set2);
    try {
      store.getProfileSet("device3");
      fail("no UnknownProfileMemberException");
    } catch (UnknownProfileMemberException e) {
    }
    try {
      assertEquals(set1, store.getProfileSet("device1"));
    } catch (UnknownProfileMemberException e1) {
      fail("failed to get set");
    }
    try {
      assertEquals(set2, store.getProfileSet("device2"));
    } catch (UnknownProfileMemberException e1) {
      fail("failed to get set");
    }
    try {
      DefaultProfileStore.UnitTest.addProfileSet(store, set1);
      assertEquals(set1, store.getProfileSet("device2"));
    } catch (UnknownProfileMemberException e1) {
      fail("failed to get set");
    }
  }
View Full Code Here

TOP

Related Classes of org.milyn.profile.DefaultProfileStore

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.