--- /dev/null
+/*
+ * Sone - IdentityAddedEventTest.java - Copyright © 2013 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.freenet.wot.event;
+
+import static org.hamcrest.MatcherAssert.assertThat;
+import static org.hamcrest.Matchers.is;
+import static org.mockito.Mockito.mock;
+
+import net.pterodactylus.sone.freenet.wot.Identity;
+import net.pterodactylus.sone.freenet.wot.OwnIdentity;
+
+import org.junit.Test;
+
+/**
+ * Unit test for {@link IdentityAddedEvent}.
+ *
+ * @author <a href="mailto:bombe@pterodactylus.net">David ‘Bombe’ Roden</a>
+ */
+public class IdentityAddedEventTest {
+
+ @Test
+ public void eventStoresAndReturnsIdentities() {
+ OwnIdentity ownIdentity = mock(OwnIdentity.class);
+ Identity identity = mock(Identity.class);
+ IdentityAddedEvent identityAddedEvent = new IdentityAddedEvent(ownIdentity, identity);
+ assertThat(identityAddedEvent.ownIdentity(), is(ownIdentity));
+ assertThat(identityAddedEvent.identity(), is(identity));
+ }
+
+}
--- /dev/null
+/*
+ * Sone - IdentityRemovedEventTest.java - Copyright © 2013 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.freenet.wot.event;
+
+import static org.hamcrest.MatcherAssert.assertThat;
+import static org.hamcrest.Matchers.is;
+import static org.mockito.Mockito.mock;
+
+import net.pterodactylus.sone.freenet.wot.Identity;
+import net.pterodactylus.sone.freenet.wot.OwnIdentity;
+
+import org.junit.Test;
+
+/**
+ * Unit test for {@link IdentityRemovedEvent}.
+ *
+ * @author <a href="mailto:bombe@pterodactylus.net">David ‘Bombe’ Roden</a>
+ */
+public class IdentityRemovedEventTest {
+
+ @Test
+ public void eventStoresAndReturnsIdentities() {
+ OwnIdentity ownIdentity = mock(OwnIdentity.class);
+ Identity identity = mock(Identity.class);
+ IdentityRemovedEvent identityRemovedEvent = new IdentityRemovedEvent(ownIdentity, identity);
+ assertThat(identityRemovedEvent.ownIdentity(), is(ownIdentity));
+ assertThat(identityRemovedEvent.identity(), is(identity));
+ }
+
+}
--- /dev/null
+/*
+ * Sone - IdentityUpdatedEventTest.java - Copyright © 2013 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.freenet.wot.event;
+
+import static org.hamcrest.MatcherAssert.assertThat;
+import static org.hamcrest.Matchers.is;
+import static org.mockito.Mockito.mock;
+
+import net.pterodactylus.sone.freenet.wot.Identity;
+import net.pterodactylus.sone.freenet.wot.OwnIdentity;
+
+import org.junit.Test;
+
+/**
+ * Unit test for {@link IdentityUpdatedEvent}.
+ *
+ * @author <a href="mailto:bombe@pterodactylus.net">David ‘Bombe’ Roden</a>
+ */
+public class IdentityUpdatedEventTest {
+
+ @Test
+ public void eventStoresAndReturnsIdentities() {
+ OwnIdentity ownIdentity = mock(OwnIdentity.class);
+ Identity identity = mock(Identity.class);
+ IdentityUpdatedEvent identityUpdatedEvent = new IdentityUpdatedEvent(ownIdentity, identity);
+ assertThat(identityUpdatedEvent.ownIdentity(), is(ownIdentity));
+ assertThat(identityUpdatedEvent.identity(), is(identity));
+ }
+
+}
--- /dev/null
+/*
+ * Sone - OwnIdentityAddedEventTest.java - Copyright © 2013 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.freenet.wot.event;
+
+import static org.hamcrest.MatcherAssert.assertThat;
+import static org.hamcrest.Matchers.is;
+import static org.mockito.Mockito.mock;
+
+import net.pterodactylus.sone.freenet.wot.OwnIdentity;
+
+import org.junit.Test;
+
+/**
+ * Unit test for {@link OwnIdentityAddedEvent}.
+ *
+ * @author <a href="mailto:bombe@pterodactylus.net">David ‘Bombe’ Roden</a>
+ */
+public class OwnIdentityAddedEventTest {
+
+ @Test
+ public void eventStoresAndReturnsOwnIdentity() {
+ OwnIdentity ownIdentity = mock(OwnIdentity.class);
+ OwnIdentityAddedEvent ownIdentityAddedEvent = new OwnIdentityAddedEvent(ownIdentity);
+ assertThat(ownIdentityAddedEvent.ownIdentity(), is(ownIdentity));
+ }
+
+}
--- /dev/null
+/*
+ * Sone - OwnIdentityRemovedEventTest.java - Copyright © 2013 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.freenet.wot.event;
+
+import static org.hamcrest.MatcherAssert.assertThat;
+import static org.hamcrest.Matchers.is;
+import static org.mockito.Mockito.mock;
+
+import net.pterodactylus.sone.freenet.wot.OwnIdentity;
+
+import org.junit.Test;
+
+/**
+ * Unit test for {@link OwnIdentityRemovedEvent}.
+ *
+ * @author <a href="mailto:bombe@pterodactylus.net">David ‘Bombe’ Roden</a>
+ */
+public class OwnIdentityRemovedEventTest {
+
+ @Test
+ public void eventStoresAndReturnsOwnIdentity() {
+ OwnIdentity ownIdentity = mock(OwnIdentity.class);
+ OwnIdentityRemovedEvent ownIdentityRemovedEvent = new OwnIdentityRemovedEvent(ownIdentity);
+ assertThat(ownIdentityRemovedEvent.ownIdentity(), is(ownIdentity));
+ }
+
+}