String userId = "user1";
// Order
Date now = new Date( );
Integer orderUId = _petstore.createOrder( userId, now, map );
OrderValue order = _petstore.getOrder( orderUId );
//System.out.println( "order=" + order );
assertNotNull( "order=null", order );
assertEquals( "order.orderUID", orderUId, order.getOrderUId( ) );
assertNotNull( "order.date=null", order.getOrderDate( ) );
assertEquals( "order.date", now.getTime( ) / 100000, order.getOrderDate( ).getTime( ) / 100000, 1000 );
assertEquals( "street1", "street1.1", order.getStreet1( ) );
assertEquals( "street2", "street1.2", order.getStreet2( ) );
assertEquals( "city", "city1", order.getCity( ) );
assertEquals( "state", "ST1", order.getState( ) );
assertEquals( "zipcode", "A1B-1C1", order.getZipcode( ) );
assertEquals( "country", "US", order.getCountry( ) );
assertEquals( "creditCardType", "Visa", order.getCreditCardType( ) );
assertEquals( "creditCardNumber", "111-111-111", order.getCreditCardNumber( ) );
assertEquals( "creditCardExpiryDate", "01-11", order.getCreditCardExpiryDate( ) );
assertNotNull( "order.status=null", order.getStatus( ) );
}
catch ( Exception e )
{
fail( "Error=" + e.toString( ) );
}