Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FINERACT-2181: Update Test annotation import #4383

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public class BusinessDateData implements Serializable {
private LocalDate date;

public static BusinessDateData instance(BusinessDateType businessDateType, LocalDate value) {
return new BusinessDateData().setType(businessDateType.getName()).setDate(value);
return new BusinessDateData().setType(businessDateType.getName()).setDescription(businessDateType.getDescription()).setDate(value);
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
import org.apache.fineract.infrastructure.core.serialization.ExcludeNothingWithPrettyPrintingOffJsonSerializerGoogleGson;
import org.apache.fineract.infrastructure.core.serialization.ExcludeNothingWithPrettyPrintingOnJsonSerializerGoogleGson;
import org.apache.fineract.infrastructure.core.serialization.GoogleGsonSerializerHelper;
import org.junit.Test;
import org.junit.jupiter.api.Test;

public class BusinessDataSerialized {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
import static org.junit.Assert.assertEquals;

import org.apache.fineract.infrastructure.businessdate.domain.BusinessDateType;
import org.junit.Test;
import org.junit.jupiter.api.Test;

public class BusinessDataTypeTest {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
import org.apache.fineract.infrastructure.businessdate.data.BusinessDateData;
import org.apache.fineract.infrastructure.businessdate.domain.BusinessDate;
import org.apache.fineract.infrastructure.businessdate.domain.BusinessDateType;
import org.junit.Test;
import org.junit.jupiter.api.Test;
import org.mapstruct.factory.Mappers;

public class BusinessDateMapperTest {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
import org.apache.fineract.infrastructure.core.api.JsonCommand;
import org.apache.fineract.infrastructure.core.exception.PlatformApiDataValidationException;
import org.apache.fineract.infrastructure.core.serialization.FromJsonHelper;
import org.junit.Test;
import org.junit.jupiter.api.Test;

public class BusinessDateValidatorTest {

Expand Down Expand Up @@ -61,7 +61,7 @@ public void validateAndParseUpdateWithInvalidLocale() {
JsonCommand command = JsonCommand.from(json);
PlatformApiDataValidationException exception = assertThrows(PlatformApiDataValidationException.class,
() -> businessDateDataParserAndValidator.validateAndParseUpdate(command));
assertEquals("PlatformApiDataValidationException{errors=[The parameter `locale` has an invalid language value: `invalid`.]}",
assertEquals("PlatformApiDataValidationException{errors=[The parameter `locale` has an invalid language value invalid .]}",
exception.toString());
}

Expand All @@ -82,7 +82,7 @@ public void validateAndParseUpdateWithInvalidDateFormat() {
PlatformApiDataValidationException exception = assertThrows(PlatformApiDataValidationException.class,
() -> businessDateDataParserAndValidator.validateAndParseUpdate(command));
assertEquals(
"PlatformApiDataValidationException{errors=[The parameter `date` (value=2022-06-11) is invalid based on the dateFormat: `y2yyy-MM-dd` and locale: `hu` provided.]}",
"PlatformApiDataValidationException{errors=[The parameter `date` is invalid based on the dateFormat: `y2yyy-MM-dd` and locale: `hu` provided:]}",
exception.toString());
}

Expand All @@ -93,7 +93,7 @@ public void validateAndParseUpdateWithInvalidDate() {
PlatformApiDataValidationException exception = assertThrows(PlatformApiDataValidationException.class,
() -> businessDateDataParserAndValidator.validateAndParseUpdate(command));
assertEquals(
"PlatformApiDataValidationException{errors=[The parameter `date` (value=2y22-06-11) is invalid based on the dateFormat: `yyyy-MM-dd` and locale: `hu` provided.]}",
"PlatformApiDataValidationException{errors=[The parameter `date` is invalid based on the dateFormat: `yyyy-MM-dd` and locale: `hu` provided:]}",
exception.toString());
}

Expand All @@ -104,7 +104,7 @@ public void validateAndParseUpdateWithWrongDate() {
PlatformApiDataValidationException exception = assertThrows(PlatformApiDataValidationException.class,
() -> businessDateDataParserAndValidator.validateAndParseUpdate(command));
assertEquals(
"PlatformApiDataValidationException{errors=[The parameter `date` (value=11-06-2022) is invalid based on the dateFormat: `yyyy-MM-dd` and locale: `hu` provided.]}",
"PlatformApiDataValidationException{errors=[The parameter `date` is invalid based on the dateFormat: `yyyy-MM-dd` and locale: `hu` provided:]}",
exception.toString());
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;
import org.junit.Test;
import org.junit.jupiter.api.Test;

public class MessageFactoryTest {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
import java.util.List;
import java.util.Set;
import org.apache.fineract.portfolio.charge.domain.ChargeTimeType;
import org.junit.Test;
import org.junit.jupiter.api.Test;
import org.springframework.test.util.ReflectionTestUtils;

public class LoanChargeEffectiveDueDateComparatorTest {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@
import org.apache.fineract.client.models.PostLoanProductsResponse;
import org.apache.fineract.client.models.PostLoansResponse;
import org.apache.fineract.integrationtests.common.ClientHelper;
import org.junit.Test;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;

@Slf4j
public class LoanPrepayAmountTest extends BaseLoanIntegrationTest {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
import org.apache.fineract.client.models.PostLoanProductsResponse;
import org.apache.fineract.client.models.PostLoansResponse;
import org.apache.fineract.integrationtests.common.ClientHelper;
import org.junit.Test;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;

public class LoanSummaryTest extends BaseLoanIntegrationTest {

Expand Down
Loading