question stringlengths 935 50.2k | answer stringlengths 92 8.26k |
|---|---|
<s>[INST] <<SYS>>
You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code.
<</SYS>>
Please complete an exceptional behavior test method in Java to test the method 'getAmountMajorLong' in class 'org.joda.money.BigMoney' for the... | ```java
@Test(expected = ArithmeticException.class)
public void test_getAmountMajorLong_tooBigPositive() {
GBP_LONG_MAX_MAJOR_PLUS1.getAmountMajorLong();
}
```
</s> |
<s>[INST] <<SYS>>
You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code.
<</SYS>>
Please complete an exceptional behavior test method in Java to test the method 'getAmountMajorLong' in class 'org.joda.money.BigMoney' for the... | ```java
@Test(expected = ArithmeticException.class)
public void test_getAmountMajorLong_tooBigNegative() {
GBP_LONG_MIN_MAJOR_MINUS1.getAmountMajorLong();
}
```
</s> |
<s>[INST] <<SYS>>
You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code.
<</SYS>>
Please complete an exceptional behavior test method in Java to test the method 'getAmountMajorInt' in class 'org.joda.money.BigMoney' for the ... | ```java
@Test(expected = ArithmeticException.class)
public void test_getAmountMajorInt_tooBigPositive() {
GBP_INT_MAX_MAJOR_PLUS1.getAmountMajorInt();
}
```
</s> |
<s>[INST] <<SYS>>
You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code.
<</SYS>>
Please complete an exceptional behavior test method in Java to test the method 'getAmountMajorInt' in class 'org.joda.money.BigMoney' for the ... | ```java
@Test(expected = ArithmeticException.class)
public void test_getAmountMajorInt_tooBigNegative() {
GBP_INT_MIN_MAJOR_MINUS1.getAmountMajorInt();
}
```
</s> |
<s>[INST] <<SYS>>
You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code.
<</SYS>>
Please complete an exceptional behavior test method in Java to test the method 'getAmountMinorLong' in class 'org.joda.money.BigMoney' for the... | ```java
@Test(expected = ArithmeticException.class)
public void test_getAmountMinorLong_tooBigPositive() {
GBP_LONG_MAX_PLUS1.getAmountMinorLong();
}
```
</s> |
<s>[INST] <<SYS>>
You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code.
<</SYS>>
Please complete an exceptional behavior test method in Java to test the method 'getAmountMinorLong' in class 'org.joda.money.BigMoney' for the... | ```java
@Test(expected = ArithmeticException.class)
public void test_getAmountMinorLong_tooBigNegative() {
GBP_LONG_MIN_MINUS1.getAmountMinorLong();
}
```
</s> |
<s>[INST] <<SYS>>
You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code.
<</SYS>>
Please complete an exceptional behavior test method in Java to test the method 'getAmountMinorInt' in class 'org.joda.money.BigMoney' for the ... | ```java
@Test(expected = ArithmeticException.class)
public void test_getAmountMinorInt_tooBigPositive() {
GBP_INT_MAX_PLUS1.getAmountMinorInt();
}
```
</s> |
<s>[INST] <<SYS>>
You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code.
<</SYS>>
Please complete an exceptional behavior test method in Java to test the method 'getAmountMinorInt' in class 'org.joda.money.BigMoney' for the ... | ```java
@Test(expected = ArithmeticException.class)
public void test_getAmountMinorInt_tooBigNegative() {
GBP_INT_MIN_MINUS1.getAmountMinorInt();
}
```
</s> |
<s>[INST] <<SYS>>
You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code.
<</SYS>>
Please complete an exceptional behavior test method in Java to test the method 'withAmount' in class 'org.joda.money.BigMoney' for the excepti... | ```java
@Test(expected = NullPointerException.class)
public void test_withAmount_BigDecimal_nullBigDecimal() {
GBP_2_34.withAmount((BigDecimal) null);
}
```
</s> |
<s>[INST] <<SYS>>
You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code.
<</SYS>>
Please complete an exceptional behavior test method in Java to test the method 'plus' in class 'org.joda.money.BigMoney' for the exception 'Cu... | ```java
@Test(expected = CurrencyMismatchException.class)
public void test_plus_Iterable_currencyMismatch() {
Iterable<BigMoneyProvider> iterable = Arrays.<BigMoneyProvider>asList(GBP_2_33, JPY_423);
GBP_M5_78.plus(iterable);
}
```
</s> |
<s>[INST] <<SYS>>
You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code.
<</SYS>>
Please complete an exceptional behavior test method in Java to test the method 'plus' in class 'org.joda.money.BigMoney' for the exception 'Nu... | ```java
@Test(expected = NullPointerException.class)
public void test_plus_Iterable_nullEntry() {
Iterable<BigMoneyProvider> iterable = Arrays.<BigMoneyProvider>asList(GBP_2_33, null);
GBP_M5_78.plus(iterable);
}
```
</s> |
<s>[INST] <<SYS>>
You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code.
<</SYS>>
Please complete an exceptional behavior test method in Java to test the method 'plus' in class 'org.joda.money.BigMoney' for the exception 'Nu... | ```java
@Test(expected = NullPointerException.class)
public void test_plus_Iterable_nullIterable() {
GBP_M5_78.plus((Iterable<BigMoneyProvider>) null);
}
```
</s> |
<s>[INST] <<SYS>>
You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code.
<</SYS>>
Please complete an exceptional behavior test method in Java to test the method 'plus' in class 'org.joda.money.BigMoney' for the exception 'Nu... | ```java
@Test(expected = NullPointerException.class)
public void test_plus_Iterable_badProvider() {
Iterable<BigMoneyProvider> iterable = Arrays.<BigMoneyProvider>asList(new BigMoneyProvider() {
@Override
public BigMoney toBigMoney() {
return null;
}
});
GBP_M5_78.plus(i... |
<s>[INST] <<SYS>>
You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code.
<</SYS>>
Please complete an exceptional behavior test method in Java to test the method 'plus' in class 'org.joda.money.BigMoney' for the exception 'Cu... | ```java
@Test(expected = CurrencyMismatchException.class)
public void test_plus_BigMoneyProvider_currencyMismatch() {
GBP_M5_78.plus(USD_1_23);
}
```
</s> |
<s>[INST] <<SYS>>
You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code.
<</SYS>>
Please complete an exceptional behavior test method in Java to test the method 'plus' in class 'org.joda.money.BigMoney' for the exception 'Nu... | ```java
@Test(expected = NullPointerException.class)
public void test_plus_BigMoneyProvider_nullBigMoneyProvider() {
GBP_M5_78.plus((BigMoneyProvider) null);
}
```
</s> |
<s>[INST] <<SYS>>
You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code.
<</SYS>>
Please complete an exceptional behavior test method in Java to test the method 'plus' in class 'org.joda.money.BigMoney' for the exception 'Nu... | ```java
@Test(expected = NullPointerException.class)
public void test_plus_BigMoneyProvider_badProvider() {
GBP_M5_78.plus(new BigMoneyProvider() {
@Override
public BigMoney toBigMoney() {
return null;
}
});
}
```
</s> |
<s>[INST] <<SYS>>
You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code.
<</SYS>>
Please complete an exceptional behavior test method in Java to test the method 'plus' in class 'org.joda.money.BigMoney' for the exception 'Nu... | ```java
@Test(expected = NullPointerException.class)
public void test_plus_BigDecimal_nullBigDecimal() {
GBP_M5_78.plus((BigDecimal) null);
}
```
</s> |
<s>[INST] <<SYS>>
You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code.
<</SYS>>
Please complete an exceptional behavior test method in Java to test the method 'plusRetainScale' in class 'org.joda.money.BigMoney' for the ex... | ```java
@Test(expected = ArithmeticException.class)
public void test_plusRetainScale_BigMoneyProviderRoundingMode_roundUnecessary() {
GBP_2_34.plusRetainScale(BigMoney.parse("GBP 1.235"), RoundingMode.UNNECESSARY);
}
```
</s> |
<s>[INST] <<SYS>>
You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code.
<</SYS>>
Please complete an exceptional behavior test method in Java to test the method 'plusRetainScale' in class 'org.joda.money.BigMoney' for the ex... | ```java
@Test(expected = NullPointerException.class)
public void test_plusRetainScale_BigMoneyProviderRoundingMode_nullBigDecimal() {
GBP_M5_78.plusRetainScale((BigDecimal) null, RoundingMode.UNNECESSARY);
}
```
</s> |
<s>[INST] <<SYS>>
You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code.
<</SYS>>
Please complete an exceptional behavior test method in Java to test the method 'plusRetainScale' in class 'org.joda.money.BigMoney' for the ex... | ```java
@Test(expected = NullPointerException.class)
public void test_plusRetainScale_BigMoneyProviderRoundingMode_nullRoundingMode() {
GBP_M5_78.plusRetainScale(BigMoney.parse("GBP 1.23"), (RoundingMode) null);
}
```
</s> |
<s>[INST] <<SYS>>
You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code.
<</SYS>>
Please complete an exceptional behavior test method in Java to test the method 'plusRetainScale' in class 'org.joda.money.BigMoney' for the ex... | ```java
@Test(expected = ArithmeticException.class)
public void test_plusRetainScale_BigDecimalRoundingMode_roundUnecessary() {
GBP_2_34.plusRetainScale(bd("1.235"), RoundingMode.UNNECESSARY);
}
```
</s> |
<s>[INST] <<SYS>>
You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code.
<</SYS>>
Please complete an exceptional behavior test method in Java to test the method 'plusRetainScale' in class 'org.joda.money.BigMoney' for the ex... | ```java
@Test(expected = NullPointerException.class)
public void test_plusRetainScale_BigDecimalRoundingMode_nullBigDecimal() {
GBP_M5_78.plusRetainScale((BigDecimal) null, RoundingMode.UNNECESSARY);
}
```
</s> |
<s>[INST] <<SYS>>
You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code.
<</SYS>>
Please complete an exceptional behavior test method in Java to test the method 'plusRetainScale' in class 'org.joda.money.BigMoney' for the ex... | ```java
@Test(expected = NullPointerException.class)
public void test_plusRetainScale_BigDecimalRoundingMode_nullRoundingMode() {
GBP_M5_78.plusRetainScale(BIGDEC_2_34, (RoundingMode) null);
}
```
</s> |
<s>[INST] <<SYS>>
You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code.
<</SYS>>
Please complete an exceptional behavior test method in Java to test the method 'plusRetainScale' in class 'org.joda.money.BigMoney' for the ex... | ```java
@Test(expected = ArithmeticException.class)
public void test_plusRetainScale_doubleRoundingMode_roundUnecessary() {
GBP_2_34.plusRetainScale(1.235d, RoundingMode.UNNECESSARY);
}
```
</s> |
<s>[INST] <<SYS>>
You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code.
<</SYS>>
Please complete an exceptional behavior test method in Java to test the method 'plusRetainScale' in class 'org.joda.money.BigMoney' for the ex... | ```java
@Test(expected = NullPointerException.class)
public void test_plusRetainScale_doubleRoundingMode_nullRoundingMode() {
GBP_M5_78.plusRetainScale(2.34d, (RoundingMode) null);
}
```
</s> |
<s>[INST] <<SYS>>
You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code.
<</SYS>>
Please complete an exceptional behavior test method in Java to test the method 'minus' in class 'org.joda.money.BigMoney' for the exception 'C... | ```java
@Test(expected = CurrencyMismatchException.class)
public void test_minus_Iterable_currencyMismatch() {
Iterable<BigMoneyProvider> iterable = Arrays.<BigMoneyProvider>asList(GBP_2_33, JPY_423);
GBP_M5_78.minus(iterable);
}
```
</s> |
<s>[INST] <<SYS>>
You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code.
<</SYS>>
Please complete an exceptional behavior test method in Java to test the method 'minus' in class 'org.joda.money.BigMoney' for the exception 'N... | ```java
@Test(expected = NullPointerException.class)
public void test_minus_Iterable_nullEntry() {
Iterable<BigMoneyProvider> iterable = Arrays.<BigMoneyProvider>asList(GBP_2_33, null);
GBP_M5_78.minus(iterable);
}
```
</s> |
<s>[INST] <<SYS>>
You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code.
<</SYS>>
Please complete an exceptional behavior test method in Java to test the method 'minus' in class 'org.joda.money.BigMoney' for the exception 'N... | ```java
@Test(expected = NullPointerException.class)
public void test_minus_Iterable_nullIterable() {
GBP_M5_78.minus((Iterable<BigMoneyProvider>) null);
}
```
</s> |
<s>[INST] <<SYS>>
You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code.
<</SYS>>
Please complete an exceptional behavior test method in Java to test the method 'minus' in class 'org.joda.money.BigMoney' for the exception 'N... | ```java
@Test(expected = NullPointerException.class)
public void test_minus_Iterable_badProvider() {
Iterable<BigMoneyProvider> iterable = Arrays.<BigMoneyProvider>asList(new BigMoneyProvider() {
@Override
public BigMoney toBigMoney() {
return null;
}
});
GBP_M5_78.minus... |
<s>[INST] <<SYS>>
You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code.
<</SYS>>
Please complete an exceptional behavior test method in Java to test the method 'minus' in class 'org.joda.money.BigMoney' for the exception 'C... | ```java
@Test(expected = CurrencyMismatchException.class)
public void test_minus_BigMoneyProvider_currencyMismatch() {
GBP_M5_78.minus(USD_1_23);
}
```
</s> |
<s>[INST] <<SYS>>
You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code.
<</SYS>>
Please complete an exceptional behavior test method in Java to test the method 'minus' in class 'org.joda.money.BigMoney' for the exception 'N... | ```java
@Test(expected = NullPointerException.class)
public void test_minus_BigMoneyProvider_nullBigMoneyProvider() {
GBP_M5_78.minus((BigMoneyProvider) null);
}
```
</s> |
<s>[INST] <<SYS>>
You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code.
<</SYS>>
Please complete an exceptional behavior test method in Java to test the method 'minus' in class 'org.joda.money.BigMoney' for the exception 'N... | ```java
@Test(expected = NullPointerException.class)
public void test_minus_BigMoneyProvider_badProvider() {
GBP_M5_78.minus(new BigMoneyProvider() {
@Override
public BigMoney toBigMoney() {
return null;
}
});
}
```
</s> |
<s>[INST] <<SYS>>
You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code.
<</SYS>>
Please complete an exceptional behavior test method in Java to test the method 'minus' in class 'org.joda.money.BigMoney' for the exception 'N... | ```java
@Test(expected = NullPointerException.class)
public void test_minus_BigDecimal_nullBigDecimal() {
GBP_M5_78.minus((BigDecimal) null);
}
```
</s> |
<s>[INST] <<SYS>>
You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code.
<</SYS>>
Please complete an exceptional behavior test method in Java to test the method 'minusRetainScale' in class 'org.joda.money.BigMoney' for the e... | ```java
@Test(expected = ArithmeticException.class)
public void test_minusRetainScale_BigMoneyProviderRoundingMode_roundUnecessary() {
GBP_2_34.minusRetainScale(BigMoney.parse("GBP 1.235"), RoundingMode.UNNECESSARY);
}
```
</s> |
<s>[INST] <<SYS>>
You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code.
<</SYS>>
Please complete an exceptional behavior test method in Java to test the method 'minusRetainScale' in class 'org.joda.money.BigMoney' for the e... | ```java
@Test(expected = NullPointerException.class)
public void test_minusRetainScale_BigMoneyProviderRoundingMode_nullBigMoneyProvider() {
GBP_M5_78.minusRetainScale((BigMoneyProvider) null, RoundingMode.UNNECESSARY);
}
```
</s> |
<s>[INST] <<SYS>>
You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code.
<</SYS>>
Please complete an exceptional behavior test method in Java to test the method 'minusRetainScale' in class 'org.joda.money.BigMoney' for the e... | ```java
@Test(expected = NullPointerException.class)
public void test_minusRetainScale_BigMoneyProviderRoundingMode_nullRoundingMode() {
GBP_M5_78.minusRetainScale(BigMoney.parse("GBP 123"), (RoundingMode) null);
}
```
</s> |
<s>[INST] <<SYS>>
You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code.
<</SYS>>
Please complete an exceptional behavior test method in Java to test the method 'minusRetainScale' in class 'org.joda.money.BigMoney' for the e... | ```java
@Test(expected = ArithmeticException.class)
public void test_minusRetainScale_BigDecimalRoundingMode_roundUnecessary() {
GBP_2_34.minusRetainScale(bd("1.235"), RoundingMode.UNNECESSARY);
}
```
</s> |
<s>[INST] <<SYS>>
You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code.
<</SYS>>
Please complete an exceptional behavior test method in Java to test the method 'minusRetainScale' in class 'org.joda.money.BigMoney' for the e... | ```java
@Test(expected = NullPointerException.class)
public void test_minusRetainScale_BigDecimalRoundingMode_nullBigDecimal() {
GBP_M5_78.minusRetainScale((BigDecimal) null, RoundingMode.UNNECESSARY);
}
```
</s> |
<s>[INST] <<SYS>>
You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code.
<</SYS>>
Please complete an exceptional behavior test method in Java to test the method 'minusRetainScale' in class 'org.joda.money.BigMoney' for the e... | ```java
@Test(expected = NullPointerException.class)
public void test_minusRetainScale_BigDecimalRoundingMode_nullRoundingMode() {
GBP_M5_78.minusRetainScale(BIGDEC_2_34, (RoundingMode) null);
}
```
</s> |
<s>[INST] <<SYS>>
You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code.
<</SYS>>
Please complete an exceptional behavior test method in Java to test the method 'minusRetainScale' in class 'org.joda.money.BigMoney' for the e... | ```java
@Test(expected = ArithmeticException.class)
public void test_minusRetainScale_doubleRoundingMode_roundUnecessary() {
GBP_2_34.minusRetainScale(1.235d, RoundingMode.UNNECESSARY);
}
```
</s> |
<s>[INST] <<SYS>>
You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code.
<</SYS>>
Please complete an exceptional behavior test method in Java to test the method 'minusRetainScale' in class 'org.joda.money.BigMoney' for the e... | ```java
@Test(expected = NullPointerException.class)
public void test_minusRetainScale_doubleRoundingMode_nullRoundingMode() {
GBP_M5_78.minusRetainScale(2.34d, (RoundingMode) null);
}
```
</s> |
<s>[INST] <<SYS>>
You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code.
<</SYS>>
Please complete an exceptional behavior test method in Java to test the method 'multipliedBy' in class 'org.joda.money.BigMoney' for the excep... | ```java
@Test(expected = NullPointerException.class)
public void test_multipliedBy_BigDecimal_nullBigDecimal() {
GBP_5_78.multipliedBy((BigDecimal) null);
}
```
</s> |
<s>[INST] <<SYS>>
You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code.
<</SYS>>
Please complete an exceptional behavior test method in Java to test the method 'multiplyRetainScale' in class 'org.joda.money.BigMoney' for th... | ```java
@Test(expected = NullPointerException.class)
public void test_multiplyRetainScale_BigDecimalRoundingMode_nullBigDecimal() {
GBP_5_78.multiplyRetainScale((BigDecimal) null, RoundingMode.DOWN);
}
```
</s> |
<s>[INST] <<SYS>>
You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code.
<</SYS>>
Please complete an exceptional behavior test method in Java to test the method 'multiplyRetainScale' in class 'org.joda.money.BigMoney' for th... | ```java
@Test(expected = NullPointerException.class)
public void test_multiplyRetainScale_BigDecimalRoundingMode_nullRoundingMode() {
GBP_5_78.multiplyRetainScale(bd("2.5"), (RoundingMode) null);
}
```
</s> |
<s>[INST] <<SYS>>
You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code.
<</SYS>>
Please complete an exceptional behavior test method in Java to test the method 'multiplyRetainScale' in class 'org.joda.money.BigMoney' for th... | ```java
@Test(expected = NullPointerException.class)
public void test_multiplyRetainScale_doubleRoundingMode_nullRoundingMode() {
GBP_5_78.multiplyRetainScale(2.5d, (RoundingMode) null);
}
```
</s> |
<s>[INST] <<SYS>>
You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code.
<</SYS>>
Please complete an exceptional behavior test method in Java to test the method 'dividedBy' in class 'org.joda.money.BigMoney' for the exceptio... | ```java
@Test(expected = NullPointerException.class)
public void test_dividedBy_BigDecimalRoundingMode_nullBigDecimal() {
GBP_5_78.dividedBy((BigDecimal) null, RoundingMode.DOWN);
}
```
</s> |
<s>[INST] <<SYS>>
You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code.
<</SYS>>
Please complete an exceptional behavior test method in Java to test the method 'dividedBy' in class 'org.joda.money.BigMoney' for the exceptio... | ```java
@Test(expected = NullPointerException.class)
public void test_dividedBy_BigDecimalRoundingMode_nullRoundingMode() {
GBP_5_78.dividedBy(bd("2.5"), (RoundingMode) null);
}
```
</s> |
<s>[INST] <<SYS>>
You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code.
<</SYS>>
Please complete an exceptional behavior test method in Java to test the method 'dividedBy' in class 'org.joda.money.BigMoney' for the exceptio... | ```java
@Test(expected = NullPointerException.class)
public void test_dividedBy_doubleRoundingMode_nullRoundingMode() {
GBP_5_78.dividedBy(2.5d, (RoundingMode) null);
}
```
</s> |
<s>[INST] <<SYS>>
You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code.
<</SYS>>
Please complete an exceptional behavior test method in Java to test the method 'convertedTo' in class 'org.joda.money.BigMoney' for the except... | ```java
@Test(expected = IllegalArgumentException.class)
public void test_convertedTo_CurrencyUnit_BigDecimal_negative() {
GBP_2_33.convertedTo(EUR, bd("-2.5"));
}
```
</s> |
<s>[INST] <<SYS>>
You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code.
<</SYS>>
Please complete an exceptional behavior test method in Java to test the method 'convertedTo' in class 'org.joda.money.BigMoney' for the except... | ```java
@Test(expected = IllegalArgumentException.class)
public void test_convertedTo_CurrencyUnit_BigDecimal_sameCurrencyWrongFactor() {
GBP_2_33.convertedTo(GBP, bd("2.5"));
}
```
</s> |
<s>[INST] <<SYS>>
You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code.
<</SYS>>
Please complete an exceptional behavior test method in Java to test the method 'convertedTo' in class 'org.joda.money.BigMoney' for the except... | ```java
@Test(expected = NullPointerException.class)
public void test_convertedTo_CurrencyUnit_BigDecimal_nullCurrency() {
GBP_5_78.convertedTo((CurrencyUnit) null, bd("2"));
}
```
</s> |
<s>[INST] <<SYS>>
You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code.
<</SYS>>
Please complete an exceptional behavior test method in Java to test the method 'convertedTo' in class 'org.joda.money.BigMoney' for the except... | ```java
@Test(expected = NullPointerException.class)
public void test_convertedTo_CurrencyUnit_BigDecimal_nullBigDecimal() {
GBP_5_78.convertedTo(EUR, (BigDecimal) null);
}
```
</s> |
<s>[INST] <<SYS>>
You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code.
<</SYS>>
Please complete an exceptional behavior test method in Java to test the method 'convertRetainScale' in class 'org.joda.money.BigMoney' for the... | ```java
@Test(expected = IllegalArgumentException.class)
public void test_convertRetainScale_CurrencyUnit_BigDecimal_RoundingMode_negative() {
GBP_2_33.convertRetainScale(EUR, bd("-2.5"), RoundingMode.DOWN);
}
```
</s> |
<s>[INST] <<SYS>>
You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code.
<</SYS>>
Please complete an exceptional behavior test method in Java to test the method 'convertRetainScale' in class 'org.joda.money.BigMoney' for the... | ```java
@Test(expected = IllegalArgumentException.class)
public void test_convertRetainScale_CurrencyUnit_BigDecimal_RoundingMode_sameCurrency() {
GBP_2_33.convertRetainScale(GBP, bd("2.5"), RoundingMode.DOWN);
}
```
</s> |
<s>[INST] <<SYS>>
You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code.
<</SYS>>
Please complete an exceptional behavior test method in Java to test the method 'convertRetainScale' in class 'org.joda.money.BigMoney' for the... | ```java
@Test(expected = NullPointerException.class)
public void test_convertRetainScale_CurrencyUnit_BigDecimal_RoundingMode_nullCurrency() {
GBP_5_78.convertRetainScale((CurrencyUnit) null, bd("2"), RoundingMode.DOWN);
}
```
</s> |
<s>[INST] <<SYS>>
You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code.
<</SYS>>
Please complete an exceptional behavior test method in Java to test the method 'convertRetainScale' in class 'org.joda.money.BigMoney' for the... | ```java
@Test(expected = NullPointerException.class)
public void test_convertRetainScale_CurrencyUnit_BigDecimal_RoundingMode_nullBigDecimal() {
GBP_5_78.convertRetainScale(EUR, (BigDecimal) null, RoundingMode.DOWN);
}
```
</s> |
<s>[INST] <<SYS>>
You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code.
<</SYS>>
Please complete an exceptional behavior test method in Java to test the method 'convertRetainScale' in class 'org.joda.money.BigMoney' for the... | ```java
@Test(expected = NullPointerException.class)
public void test_convertRetainScale_CurrencyUnit_BigDecimal_RoundingMode_nullRoundingMode() {
GBP_5_78.convertRetainScale(EUR, bd("2"), (RoundingMode) null);
}
```
</s> |
<s>[INST] <<SYS>>
You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code.
<</SYS>>
Please complete an exceptional behavior test method in Java to test the method 'isSameCurrency' in class 'org.joda.money.BigMoney' for the exc... | ```java
@Test(expected = NullPointerException.class)
public void test_isSameCurrency_Money_nullMoney() {
GBP_2_34.isSameCurrency((BigMoney) null);
}
```
</s> |
<s>[INST] <<SYS>>
You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code.
<</SYS>>
Please complete an exceptional behavior test method in Java to test the method 'compareTo' in class 'org.joda.money.BigMoney' for the exceptio... | ```java
@Test(expected = CurrencyMismatchException.class)
public void test_compareTo_currenciesDiffer() {
BigMoney a = GBP_2_34;
BigMoney b = USD_2_35;
a.compareTo(b);
}
```
</s> |
<s>[INST] <<SYS>>
You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code.
<</SYS>>
Please complete an exceptional behavior test method in Java to test the method 'compareTo' in class 'org.joda.money.BigMoney' for the exceptio... | ```java
@Test(expected = ClassCastException.class)
@SuppressWarnings({ "unchecked", "rawtypes" })
public void test_compareTo_wrongType() {
Comparable a = GBP_2_34;
a.compareTo("NotRightType");
}
```
</s> |
<s>[INST] <<SYS>>
You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code.
<</SYS>>
Please complete an exceptional behavior test method in Java to test the method 'isEqual' in class 'org.joda.money.BigMoney' for the exception ... | ```java
@Test(expected = CurrencyMismatchException.class)
public void test_isEqual_currenciesDiffer() {
BigMoney a = GBP_2_34;
BigMoney b = USD_2_35;
a.isEqual(b);
}
```
</s> |
<s>[INST] <<SYS>>
You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code.
<</SYS>>
Please complete an exceptional behavior test method in Java to test the method 'isGreaterThan' in class 'org.joda.money.BigMoney' for the exce... | ```java
@Test(expected = CurrencyMismatchException.class)
public void test_isGreaterThan_currenciesDiffer() {
BigMoney a = GBP_2_34;
BigMoney b = USD_2_35;
a.isGreaterThan(b);
}
```
</s> |
<s>[INST] <<SYS>>
You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code.
<</SYS>>
Please complete an exceptional behavior test method in Java to test the method 'isLessThan' in class 'org.joda.money.BigMoney' for the excepti... | ```java
@Test(expected = CurrencyMismatchException.class)
public void test_isLessThan_currenciesDiffer() {
BigMoney a = GBP_2_34;
BigMoney b = USD_2_35;
a.isLessThan(b);
}
```
</s> |
<s>[INST] <<SYS>>
You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code.
<</SYS>>
Please complete an exceptional behavior test method in Java to test the method 'registerCurrency' in class 'org.joda.money.CurrencyUnit' for t... | ```java
@Test(expected = NullPointerException.class)
public void test_registeredCurrency_nullCode() {
CurrencyUnit.registerCurrency(null, 991, 2, Arrays.asList("TS"));
}
```
</s> |
<s>[INST] <<SYS>>
You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code.
<</SYS>>
Please complete an exceptional behavior test method in Java to test the method 'registerCurrency' in class 'org.joda.money.CurrencyUnit' for t... | ```java
@Test(expected = IllegalArgumentException.class)
public void test_registeredCurrency_invalidStringCode_empty() {
CurrencyUnit.registerCurrency("", 991, 2, Arrays.asList("TS"));
}
```
</s> |
<s>[INST] <<SYS>>
You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code.
<</SYS>>
Please complete an exceptional behavior test method in Java to test the method 'registerCurrency' in class 'org.joda.money.CurrencyUnit' for t... | ```java
@Test(expected = IllegalArgumentException.class)
public void test_registeredCurrency_invalidStringCode_1letter() {
CurrencyUnit.registerCurrency("A", 991, 2, Arrays.asList("TS"));
}
```
</s> |
<s>[INST] <<SYS>>
You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code.
<</SYS>>
Please complete an exceptional behavior test method in Java to test the method 'registerCurrency' in class 'org.joda.money.CurrencyUnit' for t... | ```java
@Test(expected = IllegalArgumentException.class)
public void test_registeredCurrency_invalidStringCode_2letters() {
CurrencyUnit.registerCurrency("AB", 991, 2, Arrays.asList("TS"));
}
```
</s> |
<s>[INST] <<SYS>>
You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code.
<</SYS>>
Please complete an exceptional behavior test method in Java to test the method 'registerCurrency' in class 'org.joda.money.CurrencyUnit' for t... | ```java
@Test(expected = IllegalArgumentException.class)
public void test_registeredCurrency_invalidStringCode_4letters() {
CurrencyUnit.registerCurrency("ABCD", 991, 2, Arrays.asList("TS"));
}
```
</s> |
<s>[INST] <<SYS>>
You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code.
<</SYS>>
Please complete an exceptional behavior test method in Java to test the method 'registerCurrency' in class 'org.joda.money.CurrencyUnit' for t... | ```java
@Test(expected = IllegalArgumentException.class)
public void test_registeredCurrency_invalidStringCode_lowerCase() {
CurrencyUnit.registerCurrency("xxA", 991, 2, Arrays.asList("xx"));
}
```
</s> |
<s>[INST] <<SYS>>
You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code.
<</SYS>>
Please complete an exceptional behavior test method in Java to test the method 'registerCurrency' in class 'org.joda.money.CurrencyUnit' for t... | ```java
@Test(expected = IllegalArgumentException.class)
public void test_registeredCurrency_invalidStringCode_number() {
CurrencyUnit.registerCurrency("123", 991, 2, Arrays.asList("TS"));
}
```
</s> |
<s>[INST] <<SYS>>
You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code.
<</SYS>>
Please complete an exceptional behavior test method in Java to test the method 'registerCurrency' in class 'org.joda.money.CurrencyUnit' for t... | ```java
@Test(expected = IllegalArgumentException.class)
public void test_registeredCurrency_invalidStringCode_dash() {
CurrencyUnit.registerCurrency("A-", 991, 2, Arrays.asList("TS"));
}
```
</s> |
<s>[INST] <<SYS>>
You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code.
<</SYS>>
Please complete an exceptional behavior test method in Java to test the method 'registerCurrency' in class 'org.joda.money.CurrencyUnit' for t... | ```java
@Test(expected = IllegalArgumentException.class)
public void test_registeredCurrency_invalidNumericCode_small() {
CurrencyUnit.registerCurrency("TST", -2, 2, Arrays.asList("TS"));
}
```
</s> |
<s>[INST] <<SYS>>
You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code.
<</SYS>>
Please complete an exceptional behavior test method in Java to test the method 'registerCurrency' in class 'org.joda.money.CurrencyUnit' for t... | ```java
@Test(expected = IllegalArgumentException.class)
public void test_registeredCurrency_invalidNumericCode_big() {
CurrencyUnit.registerCurrency("TST", 1000, 2, Arrays.asList("TS"));
}
```
</s> |
<s>[INST] <<SYS>>
You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code.
<</SYS>>
Please complete an exceptional behavior test method in Java to test the method 'registerCurrency' in class 'org.joda.money.CurrencyUnit' for t... | ```java
@Test(expected = IllegalArgumentException.class)
public void test_registeredCurrency_invalidDP_small() {
CurrencyUnit.registerCurrency("TST", 991, -2, Arrays.asList("TS"));
}
```
</s> |
<s>[INST] <<SYS>>
You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code.
<</SYS>>
Please complete an exceptional behavior test method in Java to test the method 'registerCurrency' in class 'org.joda.money.CurrencyUnit' for t... | ```java
@Test(expected = IllegalArgumentException.class)
public void test_registeredCurrency_invalidDP_big() {
CurrencyUnit.registerCurrency("TST", 991, 31, Arrays.asList("TS"));
}
```
</s> |
<s>[INST] <<SYS>>
You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code.
<</SYS>>
Please complete an exceptional behavior test method in Java to test the method 'registerCurrency' in class 'org.joda.money.CurrencyUnit' for t... | ```java
@Test(expected = NullPointerException.class)
public void test_registeredCurrency_nullCountry() {
CurrencyUnit.registerCurrency("TST", 991, 2, Arrays.asList((String) null));
}
```
</s> |
<s>[INST] <<SYS>>
You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code.
<</SYS>>
Please complete an exceptional behavior test method in Java to test the method 'registerCurrency' in class 'org.joda.money.CurrencyUnit' for t... | ```java
@Test(expected = IllegalArgumentException.class)
public void test_registeredCurrency_alreadyRegisteredCode() {
CurrencyUnit.registerCurrency("GBP", 991, 2, Arrays.asList("GB"));
}
```
</s> |
<s>[INST] <<SYS>>
You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code.
<</SYS>>
Please complete an exceptional behavior test method in Java to test the method 'registerCurrency' in class 'org.joda.money.CurrencyUnit' for t... | ```java
@Test(expected = IllegalArgumentException.class)
public void test_registeredCurrency_alreadyRegisteredNumericCode() {
CurrencyUnit.registerCurrency("TST", 826, 2, Arrays.asList("TS"));
}
```
</s> |
<s>[INST] <<SYS>>
You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code.
<</SYS>>
Please complete an exceptional behavior test method in Java to test the method 'registerCurrency' in class 'org.joda.money.CurrencyUnit' for t... | ```java
@Test(expected = IllegalArgumentException.class)
public void test_registeredCurrency_alreadyRegisteredCountry() {
CurrencyUnit.registerCurrency("GBX", 991, 2, Arrays.asList("GB"));
}
```
</s> |
<s>[INST] <<SYS>>
You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code.
<</SYS>>
Please complete an exceptional behavior test method in Java to test the method 'of' in class 'org.joda.money.CurrencyUnit' for the exception '... | ```java
@Test(expected = NullPointerException.class)
public void test_factory_of_Currency_nullCurrency() {
CurrencyUnit.of((Currency) null);
}
```
</s> |
<s>[INST] <<SYS>>
You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code.
<</SYS>>
Please complete an exceptional behavior test method in Java to test the method 'of' in class 'org.joda.money.CurrencyUnit' for the exception '... | ```java
@Test(expected = NullPointerException.class)
public void test_factory_of_String_nullString() {
CurrencyUnit.of((String) null);
}
```
</s> |
<s>[INST] <<SYS>>
You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code.
<</SYS>>
Please complete an exceptional behavior test method in Java to test the method 'of' in class 'org.joda.money.CurrencyUnit' for the exception '... | ```java
@Test(expected = IllegalCurrencyException.class)
public void test_factory_of_String_unknownCurrency() {
try {
CurrencyUnit.of("ABC");
} catch (IllegalCurrencyException ex) {
assertEquals("Unknown currency 'ABC'", ex.getMessage());
throw ex;
}
}
```
</s> |
<s>[INST] <<SYS>>
You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code.
<</SYS>>
Please complete an exceptional behavior test method in Java to test the method 'of' in class 'org.joda.money.CurrencyUnit' for the exception '... | ```java
@Test(expected = IllegalCurrencyException.class)
public void test_factory_of_String_empty() {
CurrencyUnit.of("");
}
```
</s> |
<s>[INST] <<SYS>>
You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code.
<</SYS>>
Please complete an exceptional behavior test method in Java to test the method 'of' in class 'org.joda.money.CurrencyUnit' for the exception '... | ```java
@Test(expected = IllegalCurrencyException.class)
public void test_factory_of_String_tooShort_unknown() {
CurrencyUnit.of("AB");
}
```
</s> |
<s>[INST] <<SYS>>
You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code.
<</SYS>>
Please complete an exceptional behavior test method in Java to test the method 'of' in class 'org.joda.money.CurrencyUnit' for the exception '... | ```java
@Test(expected = IllegalCurrencyException.class)
public void test_factory_of_String_tooLong_unknown() {
CurrencyUnit.of("ABCD");
}
```
</s> |
<s>[INST] <<SYS>>
You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code.
<</SYS>>
Please complete an exceptional behavior test method in Java to test the method 'ofNumericCode' in class 'org.joda.money.CurrencyUnit' for the ... | ```java
@Test(expected = NullPointerException.class)
public void test_factory_ofNumericCode_String_nullString() {
CurrencyUnit.ofNumericCode((String) null);
}
```
</s> |
<s>[INST] <<SYS>>
You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code.
<</SYS>>
Please complete an exceptional behavior test method in Java to test the method 'ofNumericCode' in class 'org.joda.money.CurrencyUnit' for the ... | ```java
@Test(expected = IllegalCurrencyException.class)
public void test_factory_ofNumericCode_String_unknownCurrency() {
try {
CurrencyUnit.ofNumericCode("111");
} catch (IllegalCurrencyException ex) {
assertEquals("Unknown currency '111'", ex.getMessage());
throw ex;
}
}
```
</s> |
<s>[INST] <<SYS>>
You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code.
<</SYS>>
Please complete an exceptional behavior test method in Java to test the method 'ofNumericCode' in class 'org.joda.money.CurrencyUnit' for the ... | ```java
@Test(expected = IllegalCurrencyException.class)
public void test_factory_ofNumericCode_String_negative() {
CurrencyUnit.ofNumericCode("-1");
}
```
</s> |
<s>[INST] <<SYS>>
You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code.
<</SYS>>
Please complete an exceptional behavior test method in Java to test the method 'ofNumericCode' in class 'org.joda.money.CurrencyUnit' for the ... | ```java
@Test(expected = IllegalCurrencyException.class)
public void test_factory_ofNumericCode_String_empty() {
try {
CurrencyUnit.ofNumericCode("");
} catch (IllegalCurrencyException ex) {
assertEquals("Unknown currency ''", ex.getMessage());
throw ex;
}
}
```
</s> |
<s>[INST] <<SYS>>
You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code.
<</SYS>>
Please complete an exceptional behavior test method in Java to test the method 'ofNumericCode' in class 'org.joda.money.CurrencyUnit' for the ... | ```java
@Test(expected = IllegalCurrencyException.class)
public void test_factory_ofNumericCode_String_tooLong() {
try {
CurrencyUnit.ofNumericCode("1234");
} catch (IllegalCurrencyException ex) {
assertEquals("Unknown currency '1234'", ex.getMessage());
throw ex;
}
}
```
</s> |
<s>[INST] <<SYS>>
You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code.
<</SYS>>
Please complete an exceptional behavior test method in Java to test the method 'ofNumericCode' in class 'org.joda.money.CurrencyUnit' for the ... | ```java
@Test(expected = IllegalCurrencyException.class)
public void test_factory_ofNumericCode_int_unknownCurrency() {
try {
CurrencyUnit.ofNumericCode(111);
} catch (IllegalCurrencyException ex) {
assertEquals("Unknown currency '111'", ex.getMessage());
throw ex;
}
}
```
</s> |
<s>[INST] <<SYS>>
You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code.
<</SYS>>
Please complete an exceptional behavior test method in Java to test the method 'ofNumericCode' in class 'org.joda.money.CurrencyUnit' for the ... | ```java
@Test(expected = IllegalCurrencyException.class)
public void test_factory_ofNumericCode_int_negative() {
try {
CurrencyUnit.ofNumericCode(-1);
} catch (IllegalCurrencyException ex) {
assertEquals("Unknown currency '-1'", ex.getMessage());
throw ex;
}
}
```
</s> |
<s>[INST] <<SYS>>
You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code.
<</SYS>>
Please complete an exceptional behavior test method in Java to test the method 'ofNumericCode' in class 'org.joda.money.CurrencyUnit' for the ... | ```java
@Test(expected = IllegalCurrencyException.class)
public void test_factory_ofNumericCode_int_tooLong() {
try {
CurrencyUnit.ofNumericCode(1234);
} catch (IllegalCurrencyException ex) {
assertEquals("Unknown currency '1234'", ex.getMessage());
throw ex;
}
}
```
</s> |
<s>[INST] <<SYS>>
You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code.
<</SYS>>
Please complete an exceptional behavior test method in Java to test the method 'of' in class 'org.joda.money.CurrencyUnit' for the exception '... | ```java
@Test(expected = NullPointerException.class)
public void test_factory_of_Locale_nullLocale() {
CurrencyUnit.of((Locale) null);
}
```
</s> |
<s>[INST] <<SYS>>
You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code.
<</SYS>>
Please complete an exceptional behavior test method in Java to test the method 'of' in class 'org.joda.money.CurrencyUnit' for the exception '... | ```java
@Test(expected = IllegalCurrencyException.class)
public void test_factory_of_Locale_unknownCurrency() {
try {
CurrencyUnit.of(new Locale("en", "XY"));
} catch (IllegalCurrencyException ex) {
assertEquals("No currency found for locale 'en_XY'", ex.getMessage());
throw ex;
}
}
... |
<s>[INST] <<SYS>>
You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code.
<</SYS>>
Please complete an exceptional behavior test method in Java to test the method 'ofCountry' in class 'org.joda.money.CurrencyUnit' for the exce... | ```java
@Test(expected = NullPointerException.class)
public void test_factory_ofCountry_String_nullString() {
CurrencyUnit.ofCountry((String) null);
}
```
</s> |
<s>[INST] <<SYS>>
You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code.
<</SYS>>
Please complete an exceptional behavior test method in Java to test the method 'ofCountry' in class 'org.joda.money.CurrencyUnit' for the exce... | ```java
@Test(expected = IllegalCurrencyException.class)
public void test_factory_ofCountry_String_unknownCurrency() {
try {
CurrencyUnit.ofCountry("gb");
} catch (IllegalCurrencyException ex) {
assertEquals("No currency found for country 'gb'", ex.getMessage());
throw ex;
}
}
```
</... |
<s>[INST] <<SYS>>
You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code.
<</SYS>>
Please complete an exceptional behavior test method in Java to test the method 'readExternal' in class 'org.joda.money.Ser' for the exception ... | ```java
@Test(expected = InvalidObjectException.class)
public void test_serialization_invalidNumericCode() throws Exception {
CurrencyUnit cu = new CurrencyUnit("GBP", (short) 234, (short) 2);
ByteArrayOutputStream baos = new ByteArrayOutputStream();
try (ObjectOutputStream oos = new ObjectOutputStream(baos... |
<s>[INST] <<SYS>>
You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code.
<</SYS>>
Please complete an exceptional behavior test method in Java to test the method 'readExternal' in class 'org.joda.money.Ser' for the exception ... | ```java
@Test(expected = InvalidObjectException.class)
public void test_serialization_invalidDecimalPlaces() throws Exception {
CurrencyUnit cu = new CurrencyUnit("GBP", (short) 826, (short) 1);
ByteArrayOutputStream baos = new ByteArrayOutputStream();
try (ObjectOutputStream oos = new ObjectOutputStream(ba... |
<s>[INST] <<SYS>>
You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code.
<</SYS>>
Please complete an exceptional behavior test method in Java to test the method 'compareTo' in class 'org.joda.money.CurrencyUnit' for the exce... | ```java
@Test(expected = NullPointerException.class)
public void test_compareTo_null() {
CurrencyUnit.of("EUR").compareTo(null);
}
```
</s> |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.