Skip to content

Update PositionWithChanges.java #108

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

Merged
merged 6 commits into from
Oct 17, 2020
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 @@ -125,7 +125,7 @@ public E getChangesInstance(Changes changes, ChangeType changeType, String table
}

try {
Class clazz = Class.forName(myself.getClass().getName().replaceAll("\\$\\$.*", ""));
Class clazz = unProxy(myself.getClass());
Constructor<E> constructor = actualElementClass.getDeclaredConstructor(clazz, Changes.class);
instance = constructor.newInstance(myself, nextChanges);
instance.as(getChangesDescription(changeType, tableName));
Expand Down
1 change: 1 addition & 0 deletions src/test/java/org/assertj/db/api/SoftAssertions_Test.java
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ public void test_soft_assert_changes() {
final SoftAssertions softly = new SoftAssertions();
softly.assertThat(changes).change().column("var1").hasValues(0);
softly.assertThat(changes).change().rowAtStartPoint().changeOfModification().column("var1").hasValues(0);
softly.assertThat(changes).ofModificationOnTable("test").hasNumberOfChanges(1);

assertThat(softly.wasSuccess()).isFalse();
assertThat(softly.errorsCollected()).hasSize(2);
Expand Down