Пример #1
0
  @Test
  public void testCreateRateFileSearchFilterForQueryForFullCustomer() {
    Customer fc = new Customer();
    fc.setName("basfull");
    quotationQuery.setCustomer(fc);

    RateFileSearchFilter filter =
        quotationUtil.createRateFileSearchFilterForQuery(quotationQuery, false);
    Assert.assertNotNull(filter);
    Assert.assertEquals(filter.getCustomer(), fc);
  }
Пример #2
0
 @Test
 public void testCreateRateFileSearchFilterForNormalQuery() {
   Country country = new Country();
   country.setShortName("kl");
   quotationQuery.setCustomer(new Customer());
   quotationQuery.setCountry(country);
   quotationQuery.setMeasurement(Measurement.KILO);
   quotationQuery.setTransportType(TransportType.EXPORT);
   quotationQuery.setKindOfRate(Kind.EXPRES);
   RateFileSearchFilter filter =
       quotationUtil.createRateFileSearchFilterForQuery(quotationQuery, false);
   Assert.assertNotNull(filter);
   Assert.assertEquals(quotationQuery.getCountry(), filter.getCountry());
   Assert.assertEquals(quotationQuery.getMeasurement(), filter.getMeasurement());
   Assert.assertEquals(quotationQuery.getTransportType(), filter.getTransportationType());
   Assert.assertEquals(quotationQuery.getKindOfRate(), filter.getRateKind());
 }