Package info.walnutstreet.vs.ps03.cache.container

Examples of info.walnutstreet.vs.ps03.cache.container.GoodUpdate


   *
   * @throws RemoteException
   *             the remote exception
   */
  public void testGetArticleAvailable() throws RemoteException {
    DBServerInterface server = DBServerImpl.getInstance();
    assertEquals(16, server.getArticleAvailable(1));
  }
View Full Code Here


   *
   * @throws RemoteException
   *             the remote exception
   */
  public void testGetArticleDescription() throws RemoteException {
    DBServerInterface server = DBServerImpl.getInstance();
    assertTrue("Ein superschnelles CD-ROM-Laufwerk".equals(server
        .getArticleDescription(1)));
  }
View Full Code Here

   *
   * @throws RemoteException
   *             the remote exception
   */
  public void testSetArticleReserved() throws RemoteException {
    DBServerInterface server = DBServerImpl.getInstance();

    server.setArticleReserved(2, 4);
    assertEquals(server.getArticleReserved(2), 4);

    server.setArticleReserved(2, 2);
    assertEquals(server.getArticleReserved(2), 2);
  }
View Full Code Here

   *
   * @throws RemoteException
   *             the remote exception
   */
  public void testGetNumberOfArticles() throws RemoteException {
    DBServerInterface server = DBServerImpl.getInstance();
    assertEquals(server.getNumberOfArticles(), 6);
  }
View Full Code Here

   *
   * @throws RemoteException
   *             the remote exception
   */
  public void testGetListOfAllArticleIDs() throws RemoteException {
    DBServerInterface server = DBServerImpl.getInstance();
    assertFalse(server.getListOfAllArticleIDs().isEmpty());
  }
View Full Code Here

   *
   * @throws RemoteException
   *             the remote exception
   */
  public void testAddArticleReserved() throws RemoteException {
    DBServerInterface server = DBServerImpl.getInstance();

    // Setzte reserved von artikel mit id 4 auf 8
    server.setArticleReserved(4, 8);
    assertEquals(server.getArticleReserved(4), 8);
    int sumbefore = server.getArticleReserved(4) + server.getArticleAvailable(4);


    // füge zwei hinzu
    server.buyArticle(4, 2);
    assertEquals(server.getArticleReserved(4), 10);

    // füge zwei hinzu
    server.buyArticle(4, 2);
    assertEquals(server.getArticleReserved(4), 12);

    // entferne zwei
    server.buyArticle(4, -2);
    assertEquals(server.getArticleReserved(4), 10);
   
    int sumafter = server.getArticleReserved(4) + server.getArticleAvailable(4);
   
    assertEquals (sumbefore, sumafter);
  }
View Full Code Here

  }

  public static void init(Composite composite) throws CompositeAlreadySetupException {
    GoodComposite.logger.debug("UI: ini the good composite");
    if (GoodComposite.composite != null) {
      throw new CompositeAlreadySetupException();
    }
    if (GoodComposite.composite == null) {
      GoodComposite.composite = new GoodComposite(composite, SWT.BORDER);
    }
  }
View Full Code Here

   * @throws CompositeAlreadySetupException
   */
  public static void init(Composite composite) throws CompositeAlreadySetupException {
    ClientListComposite.logger.debug("UI: ini the client list composite");
    if (ClientListComposite.composite != null) {
      throw new CompositeAlreadySetupException();
    }
    if (ClientListComposite.composite == null) {
      ClientListComposite.composite = new ClientListComposite(composite, SWT.BORDER);
    }
  }
View Full Code Here

  /* (non-Javadoc)
   * @see info.walnutstreet.vs.ps03.model.interfaces.GoodModelInterface#setAvailable(java.lang.Integer)
   */
  public synchronized void setAvailable(Integer available) throws InvalidAvaiableNumberException, RemoteException {
    if (available < 0)
      throw new InvalidAvaiableNumberException();
    this.available = available;
  }
View Full Code Here

  /* (non-Javadoc)
   * @see info.walnutstreet.vs.ps03.model.interfaces.GoodModelInterface#setPrice(java.lang.Float)
   */
  public synchronized void setPrice(Double price) throws InvalidPriceException, RemoteException {
    if (price < 0.0)
      throw new InvalidPriceException();
    this.price = price;
  }
View Full Code Here

TOP

Related Classes of info.walnutstreet.vs.ps03.cache.container.GoodUpdate

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.