Update tests change AssertJ StrictAssertions to Assertions

This commit is contained in:
rob bygrave
2019-10-06 16:34:44 +13:00
parent e58a85f0af
commit 1c6c812d4d
61 changed files with 89 additions and 97 deletions
+1 -1
View File
@@ -4,7 +4,7 @@ package io.ebean;
import io.ebeaninternal.server.rawsql.SpiRawSql;
import org.junit.Test;
import static org.assertj.core.api.StrictAssertions.assertThat;
import static org.assertj.core.api.Assertions.assertThat;
public class ColumnTest {
@@ -11,7 +11,7 @@ import org.junit.Test;
import org.tests.model.basic.EBasicVer;
import org.tests.model.draftable.BasicDraftableBean;
import static org.assertj.core.api.StrictAssertions.assertThat;
import static org.assertj.core.api.Assertions.assertThat;
public class PlatformNoGeneratedKeysTest {
@@ -6,7 +6,7 @@ import org.tests.model.basic.Customer;
import org.tests.model.basic.Order;
import org.junit.Test;
import static org.assertj.core.api.StrictAssertions.assertThat;
import static org.assertj.core.api.Assertions.assertThat;
/**
*/
@@ -14,7 +14,7 @@ import java.io.StringWriter;
import java.util.List;
import java.util.Map;
import static org.assertj.core.api.StrictAssertions.assertThat;
import static org.assertj.core.api.Assertions.assertThat;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNull;
@@ -15,7 +15,7 @@ import java.util.Arrays;
import java.util.List;
import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.StrictAssertions.assertThatThrownBy;
import static org.assertj.core.api.Assertions.assertThatThrownBy;
/**
@@ -3,7 +3,7 @@ package io.ebeaninternal.dbmigration.ddlgeneration.platform;
import io.ebean.config.DbConstraintNormalise;
import org.junit.Test;
import static org.assertj.core.api.StrictAssertions.assertThat;
import static org.assertj.core.api.Assertions.assertThat;
public class DbNameNormaliseTest {
@@ -11,7 +11,7 @@ import io.ebeaninternal.api.SpiEbeanServer;
import io.ebeaninternal.server.core.PlatformDdlBuilder;
import org.junit.Test;
import static org.assertj.core.api.StrictAssertions.assertThat;
import static org.assertj.core.api.Assertions.assertThat;
public class H2HistoryDdlTest {
@@ -5,7 +5,7 @@ import io.ebeaninternal.dbmigration.migration.ChangeSet;
import io.ebeaninternal.dbmigration.migration.DropColumn;
import org.junit.Test;
import static org.assertj.core.api.StrictAssertions.assertThat;
import static org.assertj.core.api.Assertions.assertThat;
public class EntryTest {
@@ -8,7 +8,7 @@ import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import static org.assertj.core.api.StrictAssertions.assertThat;
import static org.assertj.core.api.Assertions.assertThat;
// FIXME: this test should be moved to ebean-migration artifact
public class MigrationVersionTest {
@@ -8,7 +8,7 @@ import org.junit.Test;
import org.tests.model.basic.Contact;
import org.tests.model.basic.Customer;
import static org.assertj.core.api.StrictAssertions.assertThat;
import static org.assertj.core.api.Assertions.assertThat;
import static org.junit.Assert.assertTrue;
public class DefaultServerCacheManagerTest {
@@ -10,7 +10,7 @@ import org.junit.Test;
import java.io.StringWriter;
import java.util.List;
import static org.assertj.core.api.StrictAssertions.assertThat;
import static org.assertj.core.api.Assertions.assertThat;
public class ChangeJsonBuilderTest extends BaseTestCase {
@@ -5,7 +5,7 @@ import org.junit.Test;
import java.util.LinkedHashMap;
import java.util.Map;
import static org.assertj.core.api.StrictAssertions.assertThat;
import static org.assertj.core.api.Assertions.assertThat;
public class AllEqualsExpressionTest extends BaseExpressionTest {
@@ -10,7 +10,7 @@ import io.ebeaninternal.server.deploy.BeanDescriptor;
import org.tests.model.basic.Customer;
import org.tests.model.basic.Order;
import static org.assertj.core.api.StrictAssertions.assertThat;
import static org.assertj.core.api.Assertions.assertThat;
public abstract class BaseExpressionTest extends BaseTestCase {
@@ -3,7 +3,7 @@ package io.ebeaninternal.server.expression;
import io.ebeaninternal.api.SpiExpression;
import org.junit.Test;
import static org.assertj.core.api.StrictAssertions.assertThat;
import static org.assertj.core.api.Assertions.assertThat;
public class BetweenExpressionTest extends BaseExpressionTest {
@@ -2,7 +2,7 @@ package io.ebeaninternal.server.expression;
import org.junit.Test;
import static org.assertj.core.api.StrictAssertions.assertThat;
import static org.assertj.core.api.Assertions.assertThat;
public class BetweenPropertyExpressionTest extends BaseExpressionTest {
@@ -3,7 +3,7 @@ package io.ebeaninternal.server.expression;
import org.junit.Test;
import static org.assertj.core.api.StrictAssertions.assertThat;
import static org.assertj.core.api.Assertions.assertThat;
public class CaseInsensitiveEqualExpressionTest extends BaseExpressionTest {
@@ -4,7 +4,7 @@ import io.ebean.Expression;
import io.ebeaninternal.api.SpiExpression;
import org.junit.Test;
import static org.assertj.core.api.StrictAssertions.assertThat;
import static org.assertj.core.api.Assertions.assertThat;
public class DefaultExpressionFactoryTest {
@@ -3,7 +3,7 @@ package io.ebeaninternal.server.expression;
import io.ebean.ExpressionList;
import org.junit.Test;
import static org.assertj.core.api.StrictAssertions.assertThat;
import static org.assertj.core.api.Assertions.assertThat;
public class DefaultExpressionListTest extends BaseExpressionTest {
@@ -4,7 +4,7 @@ import org.junit.Test;
import java.util.Arrays;
import static org.assertj.core.api.StrictAssertions.assertThat;
import static org.assertj.core.api.Assertions.assertThat;
public class ExistsQueryExpressionTest extends BaseExpressionTest {
@@ -3,7 +3,7 @@ package io.ebeaninternal.server.expression;
import org.junit.Test;
import static org.assertj.core.api.StrictAssertions.assertThat;
import static org.assertj.core.api.Assertions.assertThat;
public class IdExpressionTest extends BaseExpressionTest {
@@ -4,7 +4,7 @@ import org.junit.Test;
import java.util.Arrays;
import static org.assertj.core.api.StrictAssertions.assertThat;
import static org.assertj.core.api.Assertions.assertThat;
public class IdInExpressionTest extends BaseExpressionTest {
@@ -6,7 +6,7 @@ import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import static org.assertj.core.api.StrictAssertions.assertThat;
import static org.assertj.core.api.Assertions.assertThat;
public class InExpressionTest extends BaseExpressionTest {
@@ -4,7 +4,7 @@ import org.junit.Test;
import java.util.Arrays;
import static org.assertj.core.api.StrictAssertions.assertThat;
import static org.assertj.core.api.Assertions.assertThat;
public class InQueryExpressionTest extends BaseExpressionTest {
@@ -3,7 +3,7 @@ package io.ebeaninternal.server.expression;
import io.ebeaninternal.api.SpiExpression;
import org.junit.Test;
import static org.assertj.core.api.StrictAssertions.assertThat;
import static org.assertj.core.api.Assertions.assertThat;
public class InRangeExpressionTest extends BaseExpressionTest {
@@ -2,7 +2,7 @@ package io.ebeaninternal.server.expression;
import org.junit.Test;
import static org.assertj.core.api.StrictAssertions.assertThat;
import static org.assertj.core.api.Assertions.assertThat;
public class JsonPathExpressionTest extends BaseExpressionTest {
@@ -3,7 +3,7 @@ package io.ebeaninternal.server.expression;
import io.ebean.LikeType;
import org.junit.Test;
import static org.assertj.core.api.StrictAssertions.assertThat;
import static org.assertj.core.api.Assertions.assertThat;
public class LikeExpressionTest extends BaseExpressionTest {
@@ -5,7 +5,7 @@ import io.ebean.Expression;
import org.junit.Test;
import static io.ebean.Expr.eq;
import static org.assertj.core.api.StrictAssertions.assertThat;
import static org.assertj.core.api.Assertions.assertThat;
public class NotExpressionTest extends BaseExpressionTest {
@@ -2,7 +2,7 @@ package io.ebeaninternal.server.expression;
import org.junit.Test;
import static org.assertj.core.api.StrictAssertions.assertThat;
import static org.assertj.core.api.Assertions.assertThat;
public class RawExpressionTest extends BaseExpressionTest {
@@ -4,7 +4,7 @@ import org.junit.Test;
import java.util.Arrays;
import static org.assertj.core.api.StrictAssertions.assertThat;
import static org.assertj.core.api.Assertions.assertThat;
public class ColumnMappingTest {
@@ -10,7 +10,6 @@ import io.ebean.SqlRow;
import io.ebean.annotation.ForPlatform;
import io.ebean.annotation.Platform;
import io.ebeaninternal.server.rawsql.SpiRawSql.Sql;
import org.assertj.core.api.StrictAssertions;
import org.junit.Test;
import org.tests.model.basic.Customer;
import org.tests.model.basic.ResetBasicData;
@@ -30,7 +29,7 @@ public class TestRawSqlBuilder extends BaseTestCase {
@Test
public void testDeriveProperty() {
StrictAssertions.assertThat(SpiRawSql.ColumnMapping.Column.derivePropertyName("item_total", "some_other")).isEqualTo("itemTotal");
assertThat(SpiRawSql.ColumnMapping.Column.derivePropertyName("item_total", "some_other")).isEqualTo("itemTotal");
assertThat(SpiRawSql.ColumnMapping.Column.derivePropertyName(null, "some_other")).isEqualTo("someOther");
assertThat(SpiRawSql.ColumnMapping.Column.derivePropertyName(null, "alias.some_other")).isEqualTo("someOther");
assertThat(SpiRawSql.ColumnMapping.Column.derivePropertyName(null, "alias.someOther")).isEqualTo("someOther");
@@ -7,7 +7,7 @@ import org.tests.model.basic.Customer;
import org.tests.model.basic.Vehicle;
import org.junit.Test;
import static org.assertj.core.api.StrictAssertions.assertThat;
import static org.assertj.core.api.Assertions.assertThat;
public class DefaultPersistenceContextTest {
@@ -15,7 +15,7 @@ import org.tests.model.basic.EBasicVer;
import org.tests.model.basic.UTDetail;
import org.tests.model.basic.UTMaster;
import static org.assertj.core.api.StrictAssertions.assertThat;
import static org.assertj.core.api.Assertions.assertThat;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertSame;
@@ -5,7 +5,7 @@ import org.junit.Test;
import java.time.Instant;
import static org.assertj.core.api.StrictAssertions.assertThat;
import static org.assertj.core.api.Assertions.assertThat;
public class IsoJsonDateTimeParserTest {
@@ -11,7 +11,6 @@ import java.io.ObjectOutputStream;
import java.util.HashMap;
import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.StrictAssertions.assertThat;
public class ModifyAwareMapTest {
@@ -12,7 +12,6 @@ import java.util.Arrays;
import java.util.HashSet;
import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.StrictAssertions.assertThat;
public class ModifyAwareSetTest {
@@ -6,7 +6,7 @@ import org.junit.Test;
import java.io.IOException;
import java.sql.Date;
import static org.assertj.core.api.StrictAssertions.assertThat;
import static org.assertj.core.api.Assertions.assertThat;
import static org.junit.Assert.assertEquals;
public class ScalarTypeDateTest {
@@ -7,7 +7,7 @@ import java.io.IOException;
import java.sql.Date;
import java.time.LocalDate;
import static org.assertj.core.api.StrictAssertions.assertThat;
import static org.assertj.core.api.Assertions.assertThat;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
@@ -6,7 +6,7 @@ import org.junit.Test;
import java.sql.Timestamp;
import java.time.OffsetDateTime;
import static org.assertj.core.api.StrictAssertions.assertThat;
import static org.assertj.core.api.Assertions.assertThat;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertTrue;
@@ -5,7 +5,7 @@ import org.junit.Test;
import java.sql.Timestamp;
import static org.assertj.core.api.StrictAssertions.assertThat;
import static org.assertj.core.api.Assertions.assertThat;
public class ScalarTypeTimestampTest {
@@ -6,7 +6,7 @@ import org.junit.Test;
import java.io.IOException;
import java.util.Date;
import static org.assertj.core.api.StrictAssertions.assertThat;
import static org.assertj.core.api.Assertions.assertThat;
public class ScalarTypeUtilDateTest {
@@ -6,7 +6,7 @@ import org.junit.Test;
import java.sql.Timestamp;
import java.time.ZonedDateTime;
import static org.assertj.core.api.StrictAssertions.assertThat;
import static org.assertj.core.api.Assertions.assertThat;
import static org.junit.Assert.*;
public class ScalarTypeZonedDateTimeTest {
@@ -6,15 +6,16 @@ import io.ebean.EbeanServer;
import io.ebean.plugin.BeanDocType;
import io.ebean.plugin.BeanType;
import io.ebeanservice.docstore.api.DocStoreUpdates;
import org.tests.model.basic.Order;
import org.assertj.core.api.StrictAssertions;
import org.junit.Test;
import org.mockito.Mockito;
import org.tests.model.basic.Order;
import java.util.List;
import static org.assertj.core.api.Assertions.assertThat;
import static org.mockito.Mockito.*;
import static org.mockito.Mockito.times;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;
public class DocStoreDeleteEventTest {
@@ -44,7 +45,7 @@ public class DocStoreDeleteEventTest {
}
@Test
public void addToQueue() throws Exception {
public void addToQueue() {
DocStoreDeleteEvent event = new DocStoreDeleteEvent(orderType(), 42);
@@ -55,9 +56,9 @@ public class DocStoreDeleteEventTest {
assertThat(queueEntries).hasSize(1);
DocStoreQueueEntry entry = queueEntries.get(0);
StrictAssertions.assertThat(entry.getBeanId()).isEqualTo(42);
StrictAssertions.assertThat(entry.getQueueId()).isEqualTo("order");
StrictAssertions.assertThat(entry.getPath()).isNull();
assertThat(entry.getBeanId()).isEqualTo(42);
assertThat(entry.getQueueId()).isEqualTo("order");
assertThat(entry.getPath()).isNull();
assertThat(entry.getType()).isEqualTo(DocStoreQueueEntry.Action.DELETE);
}
}
@@ -8,7 +8,7 @@ import org.junit.Test;
import java.util.List;
import static org.assertj.core.api.StrictAssertions.assertThat;
import static org.assertj.core.api.Assertions.assertThat;
import static org.junit.Assert.assertEquals;
public class TestInEmpty extends BaseTestCase {
@@ -9,7 +9,7 @@ import org.tests.model.basic.Contact;
import org.tests.model.basic.EBasicVer;
import org.tests.model.converstation.Group;
import static org.assertj.core.api.StrictAssertions.assertThat;
import static org.assertj.core.api.Assertions.assertThat;
public class TestDeleteWithoutOptimisticLocking extends BaseTestCase {
@@ -4,11 +4,10 @@ import io.ebean.BaseTestCase;
import io.ebean.Ebean;
import io.ebean.EbeanServer;
import io.ebean.Query;
import org.tests.model.draftable.Doc;
import org.tests.model.draftable.Link;
import org.assertj.core.api.StrictAssertions;
import org.ebeantest.LoggedSqlCollector;
import org.junit.Test;
import org.tests.model.draftable.Doc;
import org.tests.model.draftable.Link;
import javax.persistence.PersistenceException;
import java.sql.Timestamp;
@@ -48,10 +47,10 @@ public class DocLinkTest extends BaseTestCase {
public void testUpdate_whenNotPublished() {
Link link1 = new Link("update");
StrictAssertions.assertThat(link1.isDraft()).isFalse();
assertThat(link1.isDraft()).isFalse();
link1.save();
StrictAssertions.assertThat(link1.isDraft()).isTrue();
assertThat(link1.isDraft()).isTrue();
// perform stateless update
Link linkUpdate = new Link();
@@ -71,10 +70,10 @@ public class DocLinkTest extends BaseTestCase {
public void testDelete_whenNotPublished() {
Link link1 = new Link("Ld1");
StrictAssertions.assertThat(link1.isDraft()).isFalse();
assertThat(link1.isDraft()).isFalse();
link1.save();
StrictAssertions.assertThat(link1.isDraft()).isTrue();
assertThat(link1.isDraft()).isTrue();
link1.setComment("some change");
link1.save();
@@ -120,15 +119,15 @@ public class DocLinkTest extends BaseTestCase {
server.publish(Link.class, link1.getId());
link1 = Ebean.find(Link.class).setId(link1.getId()).asDraft().findOne();
StrictAssertions.assertThat(link1.isDraft()).isTrue();
assertThat(link1.isDraft()).isTrue();
// this is a soft delete (no automatic publish here, only updates draft)
link1.delete();
Link live = Ebean.find(Link.class).setId(link1.getId()).findOne();
assertThat(live).isNotNull();
StrictAssertions.assertThat(live.isDraft()).isFalse();
StrictAssertions.assertThat(live.isDeleted()).isFalse(); // soft delete state not published yet
assertThat(live.isDraft()).isFalse();
assertThat(live.isDeleted()).isFalse(); // soft delete state not published yet
// this is a permanent delete (effectively has automatic publish)
server.deletePermanent(link1);
@@ -169,19 +168,18 @@ public class DocLinkTest extends BaseTestCase {
link1.save();
Link draft1 = Ebean.find(Link.class).setId(link1.getId()).asDraft().findOne();
StrictAssertions.assertThat(draft1.isDirty()).isTrue();
assertThat(draft1.isDirty()).isTrue();
EbeanServer server = Ebean.getDefaultServer();
Link linkLive = server.publish(Link.class, link1.getId(), null);
StrictAssertions.assertThat(linkLive.getComment()).isEqualTo(comment);
StrictAssertions.assertThat(linkLive.getWhenPublish()).isEqualToIgnoringMillis(when);
assertThat(linkLive.getComment()).isEqualTo(comment);
assertThat(linkLive.getWhenPublish()).isEqualToIgnoringMillis(when);
Link draft1b = Ebean.find(Link.class).setId(link1.getId()).asDraft().findOne();
StrictAssertions.assertThat(draft1b.isDirty()).isFalse();
StrictAssertions.assertThat(draft1b.getComment()).isNull();
StrictAssertions.assertThat(draft1b.getWhenPublish()).isNull();
assertThat(draft1b.isDirty()).isFalse();
assertThat(draft1b.getComment()).isNull();
assertThat(draft1b.getWhenPublish()).isNull();
}
@Test
@@ -245,7 +243,7 @@ public class DocLinkTest extends BaseTestCase {
EbeanServer server = Ebean.getDefaultServer();
Link live = server.publish(Link.class, link1.getId(), null);
StrictAssertions.assertThat(live.isDraft()).isFalse();
assertThat(live.isDraft()).isFalse();
Link draftLink = Ebean.find(Link.class)
.setId(link1.getId())
@@ -262,8 +260,7 @@ public class DocLinkTest extends BaseTestCase {
.asDraft()
.findOne();
StrictAssertions.assertThat(draftLink.getLocation()).isEqualTo("firstLocation");
assertThat(draftLink.getLocation()).isEqualTo("firstLocation");
}
@Test
@@ -291,9 +288,8 @@ public class DocLinkTest extends BaseTestCase {
List<Link> links = server.draftRestore(query);
assertThat(links).hasSize(1);
StrictAssertions.assertThat(links.get(0).getLocation()).isEqualTo("firstLocation");
StrictAssertions.assertThat(links.get(0).isDirty()).isEqualTo(false);
StrictAssertions.assertThat(links.get(0).getComment()).isNull();
assertThat(links.get(0).getLocation()).isEqualTo("firstLocation");
assertThat(links.get(0).isDirty()).isEqualTo(false);
assertThat(links.get(0).getComment()).isNull();
}
}
@@ -2,11 +2,10 @@ package org.tests.draftable;
import io.ebean.Ebean;
import io.ebean.EbeanServer;
import org.junit.Test;
import org.tests.model.draftable.Document;
import org.tests.model.draftable.DocumentMedia;
import org.tests.model.draftable.Organisation;
import org.assertj.core.api.StrictAssertions;
import org.junit.Test;
import java.util.List;
@@ -99,8 +98,8 @@ public class OrganisationTest {
// publish will perform an insert, update and delete on child DocumentMedia
// during the publish below with media1 being deleted
Document liveBean = server.publish(Document.class, doc.getId(), null);
StrictAssertions.assertThat(liveBean.getBody()).isEqualTo("Body2");
StrictAssertions.assertThat(liveBean.getMedia().size()).isEqualTo(2);
assertThat(liveBean.getBody()).isEqualTo("Body2");
assertThat(liveBean.getMedia().size()).isEqualTo(2);
assertThat(liveBean.getMedia()).extracting("name").contains("media2", "media3");
}
@@ -5,7 +5,7 @@ import io.ebean.Ebean;
import org.tests.model.EGenProps;
import org.junit.Test;
import static org.assertj.core.api.StrictAssertions.assertThat;
import static org.assertj.core.api.Assertions.assertThat;
import static org.junit.Assert.assertNotNull;
public class TestGeneratedProperties extends BaseTestCase {
@@ -13,7 +13,7 @@ import org.junit.Test;
import java.util.List;
import static org.assertj.core.api.StrictAssertions.assertThat;
import static org.assertj.core.api.Assertions.assertThat;
import static org.junit.Assert.*;
public class TestInheritInsert extends BaseTestCase {
@@ -7,7 +7,7 @@ import org.tests.model.basic.cache.CInhOne;
import org.tests.model.basic.cache.CInhRoot;
import org.junit.Test;
import static org.assertj.core.api.StrictAssertions.assertThat;
import static org.assertj.core.api.Assertions.assertThat;
public class TestInheritanceCache extends BaseTestCase {
@@ -10,7 +10,7 @@ import org.junit.Test;
import java.util.ArrayList;
import static org.assertj.core.api.StrictAssertions.assertThat;
import static org.assertj.core.api.Assertions.assertThat;
import static org.junit.Assert.assertEquals;
public class TestJsonExcludeTransientEmptyList {
@@ -6,7 +6,7 @@ import org.junit.Test;
import java.util.ArrayList;
import static org.assertj.core.api.StrictAssertions.assertThat;
import static org.assertj.core.api.Assertions.assertThat;
public class TestModelAJson {
@@ -8,7 +8,7 @@ import org.tests.model.basic.ResetBasicData;
import java.util.Optional;
import static org.assertj.core.api.StrictAssertions.assertThat;
import static org.assertj.core.api.Assertions.assertThat;
public class TestFindOneOrEmpty extends BaseTestCase {
@@ -6,7 +6,7 @@ import io.ebean.Query;
import org.junit.Test;
import org.tests.model.basic.Customer;
import static org.assertj.core.api.StrictAssertions.assertThat;
import static org.assertj.core.api.Assertions.assertThat;
public class TestQueryOrderById extends BaseTestCase {
@@ -13,7 +13,7 @@ import org.tests.model.basic.VehicleDriver;
import java.util.ArrayList;
import java.util.List;
import static org.assertj.core.api.StrictAssertions.assertThat;
import static org.assertj.core.api.Assertions.assertThat;
public class TestSubQuery extends BaseTestCase {
@@ -6,7 +6,7 @@ import io.ebean.Query;
import org.junit.Test;
import org.tests.model.converstation.Conversation;
import static org.assertj.core.api.StrictAssertions.assertThat;
import static org.assertj.core.api.Assertions.assertThat;
public class TestFetchPreference extends BaseTestCase {
@@ -12,7 +12,7 @@ import org.junit.Test;
import java.util.List;
import static org.assertj.core.api.StrictAssertions.assertThat;
import static org.assertj.core.api.Assertions.assertThat;
import static org.junit.Assert.assertNotNull;
public class TestOrderReportTotal extends BaseTestCase {
@@ -5,7 +5,7 @@ import io.ebean.Ebean;
import org.tests.model.softdelete.ESoftDelMid;
import org.junit.Test;
import static org.assertj.core.api.StrictAssertions.assertThat;
import static org.assertj.core.api.Assertions.assertThat;
public class TestSoftDeleteOptionalRelationship extends BaseTestCase {
@@ -14,7 +14,7 @@ import org.junit.Test;
import org.tests.model.basic.Customer;
import org.tests.model.basic.Order;
import static org.assertj.core.api.StrictAssertions.assertThat;
import static org.assertj.core.api.Assertions.assertThat;
import static org.junit.Assert.fail;
public class TestExecuteComplete extends BaseTestCase {
@@ -9,7 +9,7 @@ import org.junit.Test;
import java.util.List;
import static org.assertj.core.api.StrictAssertions.assertThat;
import static org.assertj.core.api.Assertions.assertThat;
import static org.junit.Assert.assertEquals;
public class TestHstore extends BaseTestCase {
@@ -47,7 +47,7 @@ public class TestSqlUpdateUpsert extends BaseTestCase {
assertThat(found2.getId()).isEqualTo(key);
assertThat(found2.getEmail()).isEqualTo(email);
assertThat(found2.isOnlineStatus()).isFalse();
assertThat(found2.getWhenUpdated()).isGreaterThan(found.getWhenUpdated()); // otherwise this test fails on my machine
assertThat(found2.getWhenUpdated()).isAfter(found.getWhenUpdated()); // otherwise this test fails on my machine
}
@ForPlatform(Platform.POSTGRES)
@@ -84,7 +84,7 @@ public class TestSqlUpdateUpsert extends BaseTestCase {
assertThat(found2.getId()).isEqualTo(key);
assertThat(found2.getEmail()).isEqualTo("foo@one.com");
assertThat(found2.isOnlineStatus()).isFalse();
assertThat(found2.getWhenUpdated()).isGreaterThan(found.getWhenUpdated());
assertThat(found2.getWhenUpdated()).isAfter(found.getWhenUpdated());
}