Package org.apache.openejb.assembler.classic

Examples of org.apache.openejb.assembler.classic.DescriptorDataSourceDefinitionTest$Movie


    assertNotNull(c)
  }

  public void testAddRental() {
    Customer customer2 = new Customer("Sallie");
    Movie movie1 = new Movie("Gone with the Wind", Movie.REGULAR);
    Rental rental1 = new Rental(movie1, 3); // 3 day rental
    customer2.addRental(rental1);
  }
View Full Code Here


    assertEquals("David", c.getName());
  }

  public void testStatementForRegularMovie() {
    Customer customer2 = new Customer("Sallie");
    Movie movie1 = new Movie("Gone with the Wind", Movie.REGULAR);
    Rental rental1 = new Rental(movie1, 3); // 3 day rental
    customer2.addRental(rental1);
    String expected = "Rental Record for Sallie\n" +
              "\tGone with the Wind\t3.5\n" +
              "Amount owed is 3.5\n" +
View Full Code Here

    assertEquals(expected, statement);
  }
 
  public void testStatementForNewReleaseMovie() {
    Customer customer2 = new Customer("Sallie");
    Movie movie1 = new Movie("Star Wars", Movie.NEW_RELEASE);
    Rental rental1 = new Rental(movie1, 3); // 3 day rental
    customer2.addRental(rental1);
    String expected = "Rental Record for Sallie\n" +
              "\tStar Wars\t9.0\n" +
              "Amount owed is 9.0\n" +
View Full Code Here

    assertEquals(expected, statement);
  }
 
  public void testStatementForChildrensMovie() {
    Customer customer2 = new Customer("Sallie");
    Movie movie1 = new Movie("Madagascar", Movie.CHILDRENS);
    Rental rental1 = new Rental(movie1, 3); // 3 day rental
    customer2.addRental(rental1);
    String expected = "Rental Record for Sallie\n" +
              "\tMadagascar\t1.5\n" +
              "Amount owed is 1.5\n" +
View Full Code Here

    assertEquals(expected, statement);
  }
 
  public void testStatementForManyMovies() {
    Customer customer1 = new Customer("David");
    Movie movie1 = new Movie("Madagascar", Movie.CHILDRENS);
    Rental rental1 = new Rental(movie1, 6); // 6 day rental
    Movie movie2 = new Movie("Star Wars", Movie.NEW_RELEASE);
    Rental rental2 = new Rental(movie2, 2); // 2 day rental
    Movie movie3 = new Movie("Gone with the Wind", Movie.REGULAR);
    Rental rental3 = new Rental(movie3, 8); // 8 day rental
    customer1.addRental(rental1);
    customer1.addRental(rental2);
    customer1.addRental(rental3);
    String expected = "Rental Record for David\n" +
View Full Code Here

  public void testPriceBreak(){
    String name = "Serg";
    String titleMovie = "Terminator";
    Customer customerSerg = new Customer("Serg");
    try{
      Movie movieWithWrongType = new Movie("Terminator", -1);
    }catch (IllegalArgumentException e) {
      assertTrue(true);
   
    /*int daysRental = 3;
    Rental rentalMovieWithWrongType = new Rental(movieWithWrongType,daysRental);
View Full Code Here

TOP

Related Classes of org.apache.openejb.assembler.classic.DescriptorDataSourceDefinitionTest$Movie

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.