* Test method for 'com.google.checkout.sample.protocol.MerchantCalculationResultBuilder.createCouponResult(boolean, float, String, String)'
*/
public void testCreateCouponResult() throws Exception {
MerchantCalculationResultBuilder builder
= MerchantCalculationResultBuilder.getInstance();
CouponResult result1 = builder.createCouponResult(true, 10.00F,
"C10983488", "coupon 10");
assertEquals("C10983488", result1.getCode());
try {
CouponResult invalidCoupon
= builder.createCouponResult(false, -100.00F, "X1093432222",
"coupon -100");
} catch (ProtocolException protoEx) {
assertContains(protoEx.getMessage(), "negative");
}