Skip to content

Commit

Permalink
TestCase
Browse files Browse the repository at this point in the history
  • Loading branch information
周旭 committed May 9, 2022
1 parent 83b3e17 commit 8a4be18
Show file tree
Hide file tree
Showing 9 changed files with 12 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import java.time.LocalDateTime;
import java.util.*;

public class BeanRefactorTests {
public class BeanRefactorTestCase {

public static class TestBean {
@DbField(alias = "id")
Expand Down Expand Up @@ -93,6 +93,7 @@ public void test() {
values2.put("dateCreated", LocalDateTime.now());

beanReflector.reflect(beanMeta, fieldSet, values2::get).assertEqual(values2);
System.out.println("BeanRefactorTests OK!");
}


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

import java.util.Collection;

public class BoolNumFieldConvertorTests {
public class BoolNumFieldConvertorTestCase {

private final FieldConvertor convertor = new BoolNumFieldConvertor();

Expand All @@ -31,6 +31,7 @@ public void test_supports() {
Collection<FieldMeta> fieldMetas = beanMeta.getFieldMetas();
Assert.assertEquals(8, fieldMetas.size());
fieldMetas.forEach(meta -> Assert.assertTrue(convertor.supports(meta, Boolean.class)));
System.out.println("BoolNumFieldConvertorTests 01 OK!");
}

@Test
Expand All @@ -41,6 +42,7 @@ public void test_convert_vI() throws IllegalAccessException {
Assert.assertEquals(Integer.valueOf(1), entity.vI);
meta.getField().set(entity, convertor.convert(meta, false));
Assert.assertEquals(Integer.valueOf(0), entity.vI);
System.out.println("BoolNumFieldConvertorTests 02 OK!");
}

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
import java.util.Calendar;
import java.util.Date;

public class DateFieldConvertorTests {
public class DateFieldConvertorTestCase {

DateFieldConvertor convertor = new DateFieldConvertor();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
import java.util.Calendar;
import java.util.Date;

public class DateFormatterTests {
public class DateFormatterTestCase {

DateFormatFieldConvertor.Formatter dateFormatter = new DateFormatFieldConvertor().new Formatter("yyyy-MM-dd");
DateFormatFieldConvertor.Formatter dateTimeFormatter = new DateFormatFieldConvertor().new Formatter("yyyy-MM-dd HH:mm:ss");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import org.junit.Assert;
import org.junit.Test;

public class ExprParserTests {
public class ExprParserTestCase {

ExprParser.Factory parserFactory = new DefaultParserFactory();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
import java.util.HashSet;
import java.util.List;

public class MetaResolverTests {
public class MetaResolverTestCase {

static final MetaResolver metaResolver = new DefaultMetaResolver();

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

import java.util.HashMap;

public class PageResolverTests {
public class PageResolverTestCase {

@Test
public void test_page_01() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import java.util.List;
import java.util.Map;

public class SimpleSearchTests {
public class SimpleSearchTestCase {

public static final SqlResult.ResultSet EMPTY_RESULT_SET = new SqlResult.ResultSet() {
@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

import java.util.List;

public class SnippetResolverTests {
public class SnippetResolverTestCase {

final SnippetResolver resolver = new DefaultSnippetResolver();

Expand Down

0 comments on commit 8a4be18

Please sign in to comment.