Skip to content

Commit

Permalink
new release version. fixed event info feature.
Browse files Browse the repository at this point in the history
  • Loading branch information
miho committed Apr 5, 2019
1 parent 00b8894 commit 055b60c
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 1 deletion.
2 changes: 1 addition & 1 deletion gradle/project-info.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// -----------------------------------------------------------------------------
ext.publishing.artifactId = project.name.toLowerCase()
ext.publishing.groupId = 'eu.mihosoft.vcollections'
ext.publishing.versionId = '0.3.2'
ext.publishing.versionId = '0.3.3'

ext.publishing.developerName = 'Michael Hoffer'
ext.publishing.developerAlias = 'miho'
Expand Down
5 changes: 5 additions & 0 deletions src/main/java/eu/mihosoft/vcollections/VListChangeEvent.java
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,11 @@ public VListChangeEventImpl(VList<T> source, VListChange<T> added,
this.evtInfo = evtInfo;
}

@Override
public String eventInfo() {
return this.evtInfo;
}

@Override
public boolean wasAdded() {
return added.hasChanges();
Expand Down
17 changes: 17 additions & 0 deletions src/test/java/eu/mihosoft/vcollections/VListTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,23 @@
*/
public class VListTest {

@Test
public void eventInfoTest() {
VList<Integer> vList = VList.newInstance(new ArrayList<Integer>());

String customEventInfo = "my event info";

vList.setEventInfo(customEventInfo);

vList.add(123);

vList.addChangeListener(evt -> {
if (evt.wasAdded()) {
Assert.assertEquals(evt.eventInfo(), customEventInfo);
}
});
}

@Test
public void wrapListEqualsTest() {
List<Integer> aList = new ArrayList<>();
Expand Down

0 comments on commit 055b60c

Please sign in to comment.