+++ /dev/null
-/*
- * Sone - MarkSoneKnownEvent.java - Copyright © 2013–2019 David Roden
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-package net.pterodactylus.sone.core.event;
-
-import net.pterodactylus.sone.data.Sone;
-
-/**
- * Event that signals that a {@link Sone} has been marked as
- * {@link Sone#isKnown() known}.
- */
-public class MarkSoneKnownEvent extends SoneEvent {
-
- /**
- * Creates a new “Sone marked known” event.
- *
- * @param sone
- * The Sone that was marked as known
- */
- public MarkSoneKnownEvent(Sone sone) {
- super(sone);
- }
-
-}
+++ /dev/null
-/*
- * Sone - NewSoneFoundEvent.java - Copyright © 2013–2019 David Roden
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-package net.pterodactylus.sone.core.event;
-
-import net.pterodactylus.sone.data.Sone;
-
-/**
- * Event that signals that a new remote Sone was found.
- */
-public class NewSoneFoundEvent extends SoneEvent {
-
- /**
- * Creates a new “new Sone found” event.
- *
- * @param sone
- * The Sone that was found
- */
- public NewSoneFoundEvent(Sone sone) {
- super(sone);
- }
-
-}
+++ /dev/null
-/*
- * Sone - SoneEvent.java - Copyright © 2013–2019 David Roden
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-package net.pterodactylus.sone.core.event;
-
-import net.pterodactylus.sone.data.Sone;
-
-/**
- * Base class for Sone events.
- */
-public abstract class SoneEvent {
-
- /** The Sone this event is about. */
- private final Sone sone;
-
- /**
- * Creates a new Sone event.
- *
- * @param sone
- * The Sone this event is about
- */
- protected SoneEvent(Sone sone) {
- this.sone = sone;
- }
-
- //
- // ACCESSORS
- //
-
- /**
- * Returns the Sone this event is about.
- *
- * @return The Sone this event is about
- */
- public Sone sone() {
- return sone;
- }
-
-}
+++ /dev/null
-/*
- * Sone - SoneInsertAbortedEvent.java - Copyright © 2013–2019 David Roden
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-package net.pterodactylus.sone.core.event;
-
-import net.pterodactylus.sone.data.Sone;
-
-/**
- * Event that signals that a {@link Sone} insert was aborted.
- */
-public class SoneInsertAbortedEvent extends SoneEvent {
-
- /** The cause of the abortion. */
- private final Throwable cause;
-
- /**
- * Creates a new “Sone was inserted” event.
- *
- * @param sone
- * The Sone that was inserted
- * @param cause
- * The cause of the abortion
- */
- public SoneInsertAbortedEvent(Sone sone, Throwable cause) {
- super(sone);
- this.cause = cause;
- }
-
- //
- // ACCESSORS
- //
-
- /**
- * Returns the cause of the abortion.
- *
- * @return The cause of the abortion (may be {@code null})
- */
- public Throwable cause() {
- return cause;
- }
-
-}
+++ /dev/null
-/*
- * Sone - SoneInsertedEvent.java - Copyright © 2013–2019 David Roden
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-package net.pterodactylus.sone.core.event;
-
-import net.pterodactylus.sone.data.Sone;
-
-/**
- * Event that signals that a {@link Sone} was inserted.
- */
-public class SoneInsertedEvent extends SoneEvent {
-
- private final long insertDuration;
- private final String insertFingerprint;
-
- public SoneInsertedEvent(Sone sone, long insertDuration, String insertFingerprint) {
- super(sone);
- this.insertDuration = insertDuration;
- this.insertFingerprint = insertFingerprint;
- }
-
- public long insertDuration() {
- return insertDuration;
- }
-
- public String insertFingerprint() {
- return insertFingerprint;
- }
-
-}
+++ /dev/null
-/*
- * Sone - SoneInsertingEvent.java - Copyright © 2013–2019 David Roden
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-package net.pterodactylus.sone.core.event;
-
-import net.pterodactylus.sone.data.Sone;
-
-/**
- * Event that signals that a {@link Sone} is now being inserted.
- */
-public class SoneInsertingEvent extends SoneEvent {
-
- /**
- * Creates a new “Sone is being inserted” event.
- *
- * @param sone
- * The Sone that is being inserted
- */
- public SoneInsertingEvent(Sone sone) {
- super(sone);
- }
-
-}
+++ /dev/null
-/*
- * Sone - SoneLockedEvent.java - Copyright © 2013–2019 David Roden
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-package net.pterodactylus.sone.core.event;
-
-import net.pterodactylus.sone.data.Sone;
-
-/**
- * Event that signals that a {@link Sone} was locked. Only
- * {@link Sone#isLocal() local Sones} can be locked.
- */
-public class SoneLockedEvent extends SoneEvent {
-
- /**
- * Creates a new “Sone locked” event.
- *
- * @param sone
- * The Sone that was locked
- */
- public SoneLockedEvent(Sone sone) {
- super(sone);
- }
-
-}
+++ /dev/null
-/*
- * Sone - SoneRemovedEvent.java - Copyright © 2013–2019 David Roden
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-package net.pterodactylus.sone.core.event;
-
-import net.pterodactylus.sone.data.Sone;
-
-/**
- * Event that signals that a {@link Sone} was removed.
- */
-public class SoneRemovedEvent extends SoneEvent {
-
- /**
- * Creates a new “Sone removed” event.
- *
- * @param sone
- * The Sone that was removed
- */
- public SoneRemovedEvent(Sone sone) {
- super(sone);
- }
-
-}
+++ /dev/null
-/*
- * Sone - SoneUnlockedEvent.java - Copyright © 2013–2019 David Roden
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-package net.pterodactylus.sone.core.event;
-
-import net.pterodactylus.sone.data.Sone;
-
-/**
- * Event that signals that a {@link Sone} was unlocked. Only
- * {@link Sone#isLocal() local Sones} can be locked.
- */
-public class SoneUnlockedEvent extends SoneEvent {
-
- /**
- * Creates a new “Sone unlocked” event.
- *
- * @param sone
- * The Sone that was unlocked
- */
- public SoneUnlockedEvent(Sone sone) {
- super(sone);
- }
-
-}
*/
@Subscribe
public void newSoneFound(NewSoneFoundEvent newSoneFoundEvent) {
- newSoneNotification.add(newSoneFoundEvent.sone());
+ newSoneNotification.add(newSoneFoundEvent.getSone());
if (!hasFirstStartNotification()) {
notificationManager.addNotification(newSoneNotification);
}
*/
@Subscribe
public void markSoneKnown(MarkSoneKnownEvent markSoneKnownEvent) {
- newSoneNotification.remove(markSoneKnownEvent.sone());
+ newSoneNotification.remove(markSoneKnownEvent.getSone());
}
@Subscribe
@Subscribe
public void soneRemoved(SoneRemovedEvent soneRemovedEvent) {
- newSoneNotification.remove(soneRemovedEvent.sone());
+ newSoneNotification.remove(soneRemovedEvent.getSone());
}
@Subscribe
*/
@Subscribe
public void soneLocked(SoneLockedEvent soneLockedEvent) {
- final Sone sone = soneLockedEvent.sone();
+ final Sone sone = soneLockedEvent.getSone();
ScheduledFuture<?> tickerObject = ticker.schedule(new Runnable() {
@Override
*/
@Subscribe
public void soneUnlocked(SoneUnlockedEvent soneUnlockedEvent) {
- lockedSonesNotification.remove(soneUnlockedEvent.sone());
- lockedSonesTickerObjects.remove(soneUnlockedEvent.sone()).cancel(false);
+ lockedSonesNotification.remove(soneUnlockedEvent.getSone());
+ lockedSonesTickerObjects.remove(soneUnlockedEvent.getSone()).cancel(false);
}
/**
*/
@Subscribe
public void soneInserting(SoneInsertingEvent soneInsertingEvent) {
- TemplateNotification soneInsertNotification = getSoneInsertNotification(soneInsertingEvent.sone());
+ TemplateNotification soneInsertNotification = getSoneInsertNotification(soneInsertingEvent.getSone());
soneInsertNotification.set("soneStatus", "inserting");
- if (soneInsertingEvent.sone().getOptions().isSoneInsertNotificationEnabled()) {
+ if (soneInsertingEvent.getSone().getOptions().isSoneInsertNotificationEnabled()) {
notificationManager.addNotification(soneInsertNotification);
}
}
*/
@Subscribe
public void soneInserted(SoneInsertedEvent soneInsertedEvent) {
- TemplateNotification soneInsertNotification = getSoneInsertNotification(soneInsertedEvent.sone());
+ TemplateNotification soneInsertNotification = getSoneInsertNotification(soneInsertedEvent.getSone());
soneInsertNotification.set("soneStatus", "inserted");
- soneInsertNotification.set("insertDuration", soneInsertedEvent.insertDuration() / 1000);
- if (soneInsertedEvent.sone().getOptions().isSoneInsertNotificationEnabled()) {
+ soneInsertNotification.set("insertDuration", soneInsertedEvent.getInsertDuration() / 1000);
+ if (soneInsertedEvent.getSone().getOptions().isSoneInsertNotificationEnabled()) {
notificationManager.addNotification(soneInsertNotification);
}
}
*/
@Subscribe
public void soneInsertAborted(SoneInsertAbortedEvent soneInsertAbortedEvent) {
- TemplateNotification soneInsertNotification = getSoneInsertNotification(soneInsertAbortedEvent.sone());
+ TemplateNotification soneInsertNotification = getSoneInsertNotification(soneInsertAbortedEvent.getSone());
soneInsertNotification.set("soneStatus", "insert-aborted");
- soneInsertNotification.set("insert-error", soneInsertAbortedEvent.cause());
- if (soneInsertAbortedEvent.sone().getOptions().isSoneInsertNotificationEnabled()) {
+ soneInsertNotification.set("insert-error", soneInsertAbortedEvent.getCause());
+ if (soneInsertAbortedEvent.getSone().getOptions().isSoneInsertNotificationEnabled()) {
notificationManager.addNotification(soneInsertNotification);
}
}
--- /dev/null
+/*
+ * Sone - MarkSoneKnownEvent.kt - Copyright © 2013–2019 David Roden
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+package net.pterodactylus.sone.core.event
+
+import net.pterodactylus.sone.data.*
+
+/**
+ * Event that signals that a [Sone] has been marked as
+ * [known][Sone.isKnown].
+ */
+class MarkSoneKnownEvent(sone: Sone) : SoneEvent(sone)
--- /dev/null
+/*
+ * Sone - NewSoneFoundEvent.kt - Copyright © 2013–2019 David Roden
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+package net.pterodactylus.sone.core.event
+
+import net.pterodactylus.sone.data.*
+
+/**
+ * Event that signals that a new remote Sone was found.
+ */
+class NewSoneFoundEvent(sone: Sone) : SoneEvent(sone)
--- /dev/null
+/*
+ * Sone - SoneEvent.kt - Copyright © 2013–2019 David Roden
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+package net.pterodactylus.sone.core.event
+
+import net.pterodactylus.sone.data.*
+
+/**
+ * Base class for Sone events.
+ */
+abstract class SoneEvent(val sone: Sone)
--- /dev/null
+/*
+ * Sone - SoneInsertAbortedEvent.kt - Copyright © 2013–2019 David Roden
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+package net.pterodactylus.sone.core.event
+
+import net.pterodactylus.sone.data.*
+
+/**
+ * Event that signals that a [Sone] insert was aborted.
+ */
+class SoneInsertAbortedEvent(sone: Sone, val cause: Throwable) : SoneEvent(sone)
--- /dev/null
+/*
+ * Sone - SoneInsertedEvent.kt - Copyright © 2013–2019 David Roden
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+package net.pterodactylus.sone.core.event
+
+import net.pterodactylus.sone.data.*
+
+/**
+ * Event that signals that a [Sone] was inserted.
+ */
+class SoneInsertedEvent(sone: Sone, val insertDuration: Long, val insertFingerprint: String) : SoneEvent(sone)
--- /dev/null
+/*
+ * Sone - SoneInsertingEvent.kt - Copyright © 2013–2019 David Roden
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+package net.pterodactylus.sone.core.event
+
+import net.pterodactylus.sone.data.*
+
+/**
+ * Event that signals that a [Sone] is now being inserted.
+ */
+class SoneInsertingEvent(sone: Sone) : SoneEvent(sone)
--- /dev/null
+/*
+ * Sone - SoneLockedEvent.kt - Copyright © 2013–2019 David Roden
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+package net.pterodactylus.sone.core.event
+
+import net.pterodactylus.sone.data.*
+
+/**
+ * Event that signals that a [Sone] was locked. Only
+ * [local Sones][Sone.isLocal] can be locked.
+ */
+class SoneLockedEvent(sone: Sone) : SoneEvent(sone)
--- /dev/null
+/*
+ * Sone - SoneRemovedEvent.kt - Copyright © 2013–2019 David Roden
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+package net.pterodactylus.sone.core.event
+
+import net.pterodactylus.sone.data.*
+
+/**
+ * Event that signals that a [Sone] was removed.
+ */
+class SoneRemovedEvent(sone: Sone) : SoneEvent(sone)
--- /dev/null
+/*
+ * Sone - SoneUnlockedEvent.kt - Copyright © 2013–2019 David Roden
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+package net.pterodactylus.sone.core.event
+
+import net.pterodactylus.sone.data.*
+
+/**
+ * Event that signals that a [Sone] was unlocked. Only
+ * [local Sones][Sone.isLocal] can be locked.
+ */
+class SoneUnlockedEvent(sone: Sone) : SoneEvent(sone)
mismatchDescription.appendText("is not SoneRemovedEvent");
return false;
}
- if (((SoneRemovedEvent) item).sone() != sone) {
- mismatchDescription.appendText("sone is ").appendValue(((SoneRemovedEvent) item).sone());
+ if (((SoneRemovedEvent) item).getSone() != sone) {
+ mismatchDescription.appendText("sone is ").appendValue(((SoneRemovedEvent) item).getSone());
return false;
}
return true;
verify(freenetInterface).insertDirectory(eq(insertUri), any(HashMap.class), eq("index.html"));
verify(eventBus, times(2)).post(soneEvents.capture());
assertThat(soneEvents.getAllValues().get(0), instanceOf(SoneInsertingEvent.class));
- assertThat(soneEvents.getAllValues().get(0).sone(), is(sone));
+ assertThat(soneEvents.getAllValues().get(0).getSone(), is(sone));
assertThat(soneEvents.getAllValues().get(1), instanceOf(SoneInsertedEvent.class));
- assertThat(soneEvents.getAllValues().get(1).sone(), is(sone));
+ assertThat(soneEvents.getAllValues().get(1).getSone(), is(sone));
}
@Test
verify(freenetInterface).insertDirectory(eq(insertUri), any(HashMap.class), eq("index.html"));
verify(eventBus, times(2)).post(soneEvents.capture());
assertThat(soneEvents.getAllValues().get(0), instanceOf(SoneInsertingEvent.class));
- assertThat(soneEvents.getAllValues().get(0).sone(), is(sone));
+ assertThat(soneEvents.getAllValues().get(0).getSone(), is(sone));
assertThat(soneEvents.getAllValues().get(1), instanceOf(SoneInsertedEvent.class));
- assertThat(soneEvents.getAllValues().get(1).sone(), is(sone));
+ assertThat(soneEvents.getAllValues().get(1).getSone(), is(sone));
verify(core, never()).touchConfiguration();
}
verify(freenetInterface).insertDirectory(eq(insertUri), any(HashMap.class), eq("index.html"));
verify(eventBus, times(2)).post(soneEvents.capture());
assertThat(soneEvents.getAllValues().get(0), instanceOf(SoneInsertingEvent.class));
- assertThat(soneEvents.getAllValues().get(0).sone(), is(sone));
+ assertThat(soneEvents.getAllValues().get(0).getSone(), is(sone));
assertThat(soneEvents.getAllValues().get(1), instanceOf(SoneInsertAbortedEvent.class));
- assertThat(soneEvents.getAllValues().get(1).sone(), is(sone));
+ assertThat(soneEvents.getAllValues().get(1).getSone(), is(sone));
verify(core, never()).touchConfiguration();
}