Package net.alteiar.shared

Examples of net.alteiar.shared.UniqueID


              "http://www.alteiar.net/wiki/lib/exe/fetch.php?cache=&media=applications:chat.jpg"));

      compareImage(target, image.getImage().restoreImage());

      assertEquals("get image must return null if no bean are found",
          null, ImageBean.getImage(new UniqueID()));
    } catch (MalformedURLException e) {
      fail("problem with the url");
    } catch (IOException e) {
      fail("fail to read images");
    }
View Full Code Here


public class TestUniqueId extends NewCampaignTest {

  @Test
  public void testUniqueIdEquals() {
    UniqueID id1 = new UniqueID();
    UniqueID id2 = new UniqueID();

    assertTrue("Should be equals to itself", id1.equals(id1));
    assertTrue("Should be different to another id", !id1.equals(id2));
    assertTrue("Should be different to null", !id1.equals(null));
    assertTrue("Should be different to another object", !id1.equals(""));
View Full Code Here

  public void testSequenceUniqueId() {
    // TODO increase to have a better test but take long time
    int idCount = 100;
    UniqueID[] ids = new UniqueID[idCount];
    for (int i = 0; i < ids.length; i++) {
      ids[i] = new UniqueID();
    }

    for (int i = 0; i < ids.length; i++) {
      for (int j = i + 1; j < ids.length; j++) {
        if (ids[i].equals(ids[j])) {
View Full Code Here

    UniqueID[] ids = new UniqueID[idCount * 4];

    Thread tr1 = new Thread(new Runnable() {
      public void run() {
        for (int i = 0; i < ids1.length; i++) {
          ids1[i] = new UniqueID();
        }
      }
    });
    Thread tr2 = new Thread(new Runnable() {
      public void run() {
        for (int i = 0; i < ids2.length; i++) {
          ids2[i] = new UniqueID();
        }
      }
    });
    Thread tr3 = new Thread(new Runnable() {
      public void run() {
        for (int i = 0; i < ids3.length; i++) {
          ids3[i] = new UniqueID();
        }
      }
    });
    Thread tr4 = new Thread(new Runnable() {
      public void run() {
        for (int i = 0; i < ids4.length; i++) {
          ids4[i] = new UniqueID();
        }
      }
    });

    tr1.start();
View Full Code Here

    this.getMapInfo().getPanelMap()
        .setCursor(new Cursor(Cursor.DEFAULT_CURSOR));
  }

  private ManualMapFilter getMapFilter() {
    UniqueID filterId = getMapInfo().getMap().getFilter();
    return CampaignClient.getInstance().getBean(filterId);
  }
View Full Code Here

  public UniqueID getImage() {
    return image;
  }

  public void setImage(UniqueID image) {
    UniqueID oldValue = this.image;
    if (notifyRemote(PROP_IMAGE_PROPERTY, oldValue, image)) {
      this.image = image;
      notifyLocal(PROP_IMAGE_PROPERTY, oldValue, image);
    }
  }
View Full Code Here

  public UniqueID getImage() {
    return image;
  }

  public void setImage(UniqueID image) {
    UniqueID oldValue = this.image;
    if (notifyRemote(PROP_IMAGE_PROPERTY, oldValue, image)) {
      this.image = image;
      notifyLocal(PROP_IMAGE_PROPERTY, oldValue, image);
    }
  }
View Full Code Here

    putValue(SMALL_ICON, HelpersImages.getIcon(icon));
    putValue(NAME, text);
  }

  private ManualMapFilter getMapFilter() {
    UniqueID filterId = getMapInfo().getMap().getFilter();
    return CampaignClient.getInstance().getBean(filterId);
  }
View Full Code Here

TOP

Related Classes of net.alteiar.shared.UniqueID

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.