projects
/
Sone.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
7d0f3c2
)
🎨 Rename method to create replies for tests
author
David ‘Bombe’ Roden
<bombe@pterodactylus.net>
Sat, 20 Jun 2020 09:29:18 +0000
(11:29 +0200)
committer
David ‘Bombe’ Roden
<bombe@pterodactylus.net>
Sat, 20 Jun 2020 09:29:18 +0000
(11:29 +0200)
src/test/kotlin/net/pterodactylus/sone/data/ReplyTest.kt
patch
|
blob
|
history
src/test/kotlin/net/pterodactylus/sone/data/SoneTest.kt
patch
|
blob
|
history
src/test/kotlin/net/pterodactylus/sone/test/Mocks.kt
patch
|
blob
|
history
src/test/kotlin/net/pterodactylus/sone/text/SoneMentionDetectorTest.kt
patch
|
blob
|
history
src/test/kotlin/net/pterodactylus/sone/web/notification/LocalReplyHandlerTest.kt
patch
|
blob
|
history
src/test/kotlin/net/pterodactylus/sone/web/notification/MarkPostReplyKnownDuringFirstStartHandlerTest.kt
patch
|
blob
|
history
src/test/kotlin/net/pterodactylus/sone/web/notification/NotificationHandlerModuleTest.kt
patch
|
blob
|
history
src/test/kotlin/net/pterodactylus/sone/web/notification/RemotePostReplyHandlerTest.kt
patch
|
blob
|
history
diff --git
a/src/test/kotlin/net/pterodactylus/sone/data/ReplyTest.kt
b/src/test/kotlin/net/pterodactylus/sone/data/ReplyTest.kt
index
d7f7138
..
38b1077
100644
(file)
--- a/
src/test/kotlin/net/pterodactylus/sone/data/ReplyTest.kt
+++ b/
src/test/kotlin/net/pterodactylus/sone/data/ReplyTest.kt
@@
-17,7
+17,7
@@
package net.pterodactylus.sone.data
package net.pterodactylus.sone.data
-import net.pterodactylus.sone.test.
empty
PostReply
+import net.pterodactylus.sone.test.
create
PostReply
import org.hamcrest.MatcherAssert.assertThat
import org.hamcrest.Matchers.equalTo
import org.hamcrest.Matchers.greaterThan
import org.hamcrest.MatcherAssert.assertThat
import org.hamcrest.Matchers.equalTo
import org.hamcrest.Matchers.greaterThan
@@
-29,34
+29,34
@@
class ReplyTest {
@Test
fun `newestReplyFirst comparator returns less-than 0 is first reply is newer than second`() {
@Test
fun `newestReplyFirst comparator returns less-than 0 is first reply is newer than second`() {
- val newerReply =
empty
PostReply(time = 2000)
- val olderReply =
empty
PostReply(time = 1000)
+ val newerReply =
create
PostReply(time = 2000)
+ val olderReply =
create
PostReply(time = 1000)
assertThat(newestReplyFirst.compare(newerReply, olderReply), lessThan(0))
}
@Test
fun `newestReplyFirst comparator returns greater-than 0 is first reply is older than second`() {
assertThat(newestReplyFirst.compare(newerReply, olderReply), lessThan(0))
}
@Test
fun `newestReplyFirst comparator returns greater-than 0 is first reply is older than second`() {
- val newerReply =
empty
PostReply(time = 2000)
- val olderReply =
empty
PostReply(time = 1000)
+ val newerReply =
create
PostReply(time = 2000)
+ val olderReply =
create
PostReply(time = 1000)
assertThat(newestReplyFirst.compare(olderReply, newerReply), greaterThan(0))
}
@Test
fun `newestReplyFirst comparator returns 0 is first and second reply have same age`() {
assertThat(newestReplyFirst.compare(olderReply, newerReply), greaterThan(0))
}
@Test
fun `newestReplyFirst comparator returns 0 is first and second reply have same age`() {
- val reply1 =
empty
PostReply(time = 1000)
- val reply2 =
empty
PostReply(time = 1000)
+ val reply1 =
create
PostReply(time = 1000)
+ val reply2 =
create
PostReply(time = 1000)
assertThat(newestReplyFirst.compare(reply1, reply2), equalTo(0))
}
@Test
fun `noFutureReply filter recognizes reply from the future`() {
assertThat(newestReplyFirst.compare(reply1, reply2), equalTo(0))
}
@Test
fun `noFutureReply filter recognizes reply from the future`() {
- val futureReply =
empty
PostReply(time = System.currentTimeMillis() + DAYS.toMillis(1))
+ val futureReply =
create
PostReply(time = System.currentTimeMillis() + DAYS.toMillis(1))
assertThat(noFutureReply(futureReply), equalTo(false))
}
@Test
fun `noFutureReply filter recognizes reply from the present`() {
assertThat(noFutureReply(futureReply), equalTo(false))
}
@Test
fun `noFutureReply filter recognizes reply from the present`() {
- val futureReply =
empty
PostReply(time = System.currentTimeMillis())
+ val futureReply =
create
PostReply(time = System.currentTimeMillis())
assertThat(noFutureReply(futureReply), equalTo(true))
}
assertThat(noFutureReply(futureReply), equalTo(true))
}
diff --git
a/src/test/kotlin/net/pterodactylus/sone/data/SoneTest.kt
b/src/test/kotlin/net/pterodactylus/sone/data/SoneTest.kt
index
fb23121
..
9e08781
100644
(file)
--- a/
src/test/kotlin/net/pterodactylus/sone/data/SoneTest.kt
+++ b/
src/test/kotlin/net/pterodactylus/sone/data/SoneTest.kt
@@
-98,11
+98,11
@@
class SoneTest {
fun `post count comparator compares replies if posts are not different`() {
val sone1 = object : IdOnlySone("1") {
override fun getPosts() = listOf(createPost(), createPost())
fun `post count comparator compares replies if posts are not different`() {
val sone1 = object : IdOnlySone("1") {
override fun getPosts() = listOf(createPost(), createPost())
- override fun getReplies() = setOf(
emptyPostReply(), empty
PostReply())
+ override fun getReplies() = setOf(
createPostReply(), create
PostReply())
}
val sone2 = object : IdOnlySone("2") {
override fun getPosts() = listOf(createPost(), createPost())
}
val sone2 = object : IdOnlySone("2") {
override fun getPosts() = listOf(createPost(), createPost())
- override fun getReplies() = setOf(
emptyPostReply(), emptyPostReply(), empty
PostReply())
+ override fun getReplies() = setOf(
createPostReply(), createPostReply(), create
PostReply())
}
assertThat(postCountComparator.compare(sone1, sone2), greaterThan(0))
}
}
assertThat(postCountComparator.compare(sone1, sone2), greaterThan(0))
}
@@
-111,11
+111,11
@@
class SoneTest {
fun `post count comparator sorts sone with same amount of posts and replies as equal`() {
val sone1 = object : IdOnlySone("1") {
override fun getPosts() = listOf(createPost(), createPost())
fun `post count comparator sorts sone with same amount of posts and replies as equal`() {
val sone1 = object : IdOnlySone("1") {
override fun getPosts() = listOf(createPost(), createPost())
- override fun getReplies() = setOf(
emptyPostReply(), empty
PostReply())
+ override fun getReplies() = setOf(
createPostReply(), create
PostReply())
}
val sone2 = object : IdOnlySone("2") {
override fun getPosts() = listOf(createPost(), createPost())
}
val sone2 = object : IdOnlySone("2") {
override fun getPosts() = listOf(createPost(), createPost())
- override fun getReplies() = setOf(
emptyPostReply(), empty
PostReply())
+ override fun getReplies() = setOf(
createPostReply(), create
PostReply())
}
assertThat(postCountComparator.compare(sone1, sone2), equalTo(0))
}
}
assertThat(postCountComparator.compare(sone1, sone2), equalTo(0))
}
diff --git
a/src/test/kotlin/net/pterodactylus/sone/test/Mocks.kt
b/src/test/kotlin/net/pterodactylus/sone/test/Mocks.kt
index
6db8846
..
1077524
100644
(file)
--- a/
src/test/kotlin/net/pterodactylus/sone/test/Mocks.kt
+++ b/
src/test/kotlin/net/pterodactylus/sone/test/Mocks.kt
@@
-83,7
+83,7
@@
fun createPost(text: String = "", sone: Sone? = remoteSone1, known: Boolean = fa
}
}
}
}
-fun
empty
PostReply(text: String = "", post: Post? = createPost(), sone: Sone = remoteSone1, known: Boolean = false, time: Long = 1) = object : PostReply {
+fun
create
PostReply(text: String = "", post: Post? = createPost(), sone: Sone = remoteSone1, known: Boolean = false, time: Long = 1) = object : PostReply {
override val id = "reply-id"
override fun getSone() = sone
override fun getPostId() = post!!.id
override val id = "reply-id"
override fun getSone() = sone
override fun getPostId() = post!!.id
diff --git
a/src/test/kotlin/net/pterodactylus/sone/text/SoneMentionDetectorTest.kt
b/src/test/kotlin/net/pterodactylus/sone/text/SoneMentionDetectorTest.kt
index
552b7ee
..
1c08480
100644
(file)
--- a/
src/test/kotlin/net/pterodactylus/sone/text/SoneMentionDetectorTest.kt
+++ b/
src/test/kotlin/net/pterodactylus/sone/text/SoneMentionDetectorTest.kt
@@
-100,14
+100,14
@@
class SoneMentionDetectorTest {
@Test
fun `detector does not emit event for reply that contains no sones`() {
@Test
fun `detector does not emit event for reply that contains no sones`() {
- val reply =
empty
PostReply()
+ val reply =
create
PostReply()
eventBus.post(NewPostReplyFoundEvent(reply))
assertThat(capturedFoundEvents, emptyIterable())
}
@Test
fun `detector does not emit event for reply that contains two links to remote sones`() {
eventBus.post(NewPostReplyFoundEvent(reply))
assertThat(capturedFoundEvents, emptyIterable())
}
@Test
fun `detector does not emit event for reply that contains two links to remote sones`() {
- val reply =
empty
PostReply("text mentions sone://${remoteSone1.id} and sone://${remoteSone2.id}.")
+ val reply =
create
PostReply("text mentions sone://${remoteSone1.id} and sone://${remoteSone2.id}.")
eventBus.post(NewPostReplyFoundEvent(reply))
assertThat(capturedFoundEvents, emptyIterable())
}
eventBus.post(NewPostReplyFoundEvent(reply))
assertThat(capturedFoundEvents, emptyIterable())
}
@@
-115,7
+115,7
@@
class SoneMentionDetectorTest {
@Test
fun `detector emits event on reply that contains links to a remote and a local sone`() {
val post = createPost()
@Test
fun `detector emits event on reply that contains links to a remote and a local sone`() {
val post = createPost()
- val reply =
empty
PostReply("text mentions sone://${remoteSone1.id} and sone://${localSone1.id}.", post)
+ val reply =
create
PostReply("text mentions sone://${remoteSone1.id} and sone://${localSone1.id}.", post)
eventBus.post(NewPostReplyFoundEvent(reply))
assertThat(capturedFoundEvents, contains(MentionOfLocalSoneFoundEvent(post)))
}
eventBus.post(NewPostReplyFoundEvent(reply))
assertThat(capturedFoundEvents, contains(MentionOfLocalSoneFoundEvent(post)))
}
@@
-123,7
+123,7
@@
class SoneMentionDetectorTest {
@Test
fun `detector emits one event on reply that contains two links to the same local sone`() {
val post = createPost()
@Test
fun `detector emits one event on reply that contains two links to the same local sone`() {
val post = createPost()
- val reply =
empty
PostReply("text mentions sone://${localSone1.id} and sone://${localSone1.id}.", post)
+ val reply =
create
PostReply("text mentions sone://${localSone1.id} and sone://${localSone1.id}.", post)
eventBus.post(NewPostReplyFoundEvent(reply))
assertThat(capturedFoundEvents, contains(MentionOfLocalSoneFoundEvent(post)))
}
eventBus.post(NewPostReplyFoundEvent(reply))
assertThat(capturedFoundEvents, contains(MentionOfLocalSoneFoundEvent(post)))
}
@@
-131,21
+131,21
@@
class SoneMentionDetectorTest {
@Test
fun `detector emits one event on reply that contains two links to local sones`() {
val post = createPost()
@Test
fun `detector emits one event on reply that contains two links to local sones`() {
val post = createPost()
- val reply =
empty
PostReply("text mentions sone://${localSone1.id} and sone://${localSone2.id}.", post)
+ val reply =
create
PostReply("text mentions sone://${localSone1.id} and sone://${localSone2.id}.", post)
eventBus.post(NewPostReplyFoundEvent(reply))
assertThat(capturedFoundEvents, contains(MentionOfLocalSoneFoundEvent(post)))
}
@Test
fun `detector does not emit event for reply by local sone`() {
eventBus.post(NewPostReplyFoundEvent(reply))
assertThat(capturedFoundEvents, contains(MentionOfLocalSoneFoundEvent(post)))
}
@Test
fun `detector does not emit event for reply by local sone`() {
- val reply =
empty
PostReply("text mentions sone://${localSone1.id} and sone://${localSone2.id}.", sone = localSone1)
+ val reply =
create
PostReply("text mentions sone://${localSone1.id} and sone://${localSone2.id}.", sone = localSone1)
eventBus.post(NewPostReplyFoundEvent(reply))
assertThat(capturedFoundEvents, emptyIterable())
}
@Test
fun `detector does not emit event for reply without post`() {
eventBus.post(NewPostReplyFoundEvent(reply))
assertThat(capturedFoundEvents, emptyIterable())
}
@Test
fun `detector does not emit event for reply without post`() {
- val reply =
empty
PostReply("text mentions sone://${localSone1.id} and sone://${localSone2.id}.", post = null)
+ val reply =
create
PostReply("text mentions sone://${localSone1.id} and sone://${localSone2.id}.", post = null)
eventBus.post(NewPostReplyFoundEvent(reply))
assertThat(caughtExceptions, emptyIterable())
assertThat(capturedFoundEvents, emptyIterable())
eventBus.post(NewPostReplyFoundEvent(reply))
assertThat(caughtExceptions, emptyIterable())
assertThat(capturedFoundEvents, emptyIterable())
@@
-184,7
+184,7
@@
class SoneMentionDetectorTest {
@Test
fun `detector does emit removed event when reply with mention is removed and no more mentions in that post exist`() {
val post = createPost()
@Test
fun `detector does emit removed event when reply with mention is removed and no more mentions in that post exist`() {
val post = createPost()
- val reply =
empty
PostReply("sone://${localSone1.id}", post)
+ val reply =
create
PostReply("sone://${localSone1.id}", post)
postReplyProvider.postReplies[post.id] = listOf(reply)
eventBus.post(NewPostReplyFoundEvent(reply))
eventBus.post(PostReplyRemovedEvent(reply))
postReplyProvider.postReplies[post.id] = listOf(reply)
eventBus.post(NewPostReplyFoundEvent(reply))
eventBus.post(PostReplyRemovedEvent(reply))
@@
-194,7
+194,7
@@
class SoneMentionDetectorTest {
@Test
fun `detector does not emit removed event when reply with mention is removed and post mentions local sone`() {
val post = createPost("sone://${localSone1.id}")
@Test
fun `detector does not emit removed event when reply with mention is removed and post mentions local sone`() {
val post = createPost("sone://${localSone1.id}")
- val reply =
empty
PostReply("sone://${localSone1.id}", post)
+ val reply =
create
PostReply("sone://${localSone1.id}", post)
eventBus.post(NewPostReplyFoundEvent(reply))
eventBus.post(PostReplyRemovedEvent(reply))
assertThat(capturedRemovedEvents, emptyIterable())
eventBus.post(NewPostReplyFoundEvent(reply))
eventBus.post(PostReplyRemovedEvent(reply))
assertThat(capturedRemovedEvents, emptyIterable())
@@
-203,7
+203,7
@@
class SoneMentionDetectorTest {
@Test
fun `detector does emit removed event when reply with mention is removed and post mentions local sone but is known`() {
val post = createPost("sone://${localSone1.id}", known = true)
@Test
fun `detector does emit removed event when reply with mention is removed and post mentions local sone but is known`() {
val post = createPost("sone://${localSone1.id}", known = true)
- val reply =
empty
PostReply("sone://${localSone1.id}", post)
+ val reply =
create
PostReply("sone://${localSone1.id}", post)
eventBus.post(NewPostReplyFoundEvent(reply))
eventBus.post(PostReplyRemovedEvent(reply))
assertThat(capturedRemovedEvents, contains(MentionOfLocalSoneRemovedEvent(post)))
eventBus.post(NewPostReplyFoundEvent(reply))
eventBus.post(PostReplyRemovedEvent(reply))
assertThat(capturedRemovedEvents, contains(MentionOfLocalSoneRemovedEvent(post)))
@@
-212,8
+212,8
@@
class SoneMentionDetectorTest {
@Test
fun `detector does not emit removed event when reply with mention is removed and post has other replies with mentions`() {
val post = createPost()
@Test
fun `detector does not emit removed event when reply with mention is removed and post has other replies with mentions`() {
val post = createPost()
- val reply1 =
empty
PostReply("sone://${localSone1.id}", post)
- val reply2 =
empty
PostReply("sone://${localSone1.id}", post)
+ val reply1 =
create
PostReply("sone://${localSone1.id}", post)
+ val reply2 =
create
PostReply("sone://${localSone1.id}", post)
postReplyProvider.postReplies[post.id] = listOf(reply1, reply2)
eventBus.post(NewPostReplyFoundEvent(reply1))
eventBus.post(PostReplyRemovedEvent(reply1))
postReplyProvider.postReplies[post.id] = listOf(reply1, reply2)
eventBus.post(NewPostReplyFoundEvent(reply1))
eventBus.post(PostReplyRemovedEvent(reply1))
@@
-223,8
+223,8
@@
class SoneMentionDetectorTest {
@Test
fun `detector does emit removed event when reply with mention is removed and post has other replies with mentions which are known`() {
val post = createPost()
@Test
fun `detector does emit removed event when reply with mention is removed and post has other replies with mentions which are known`() {
val post = createPost()
- val reply1 =
empty
PostReply("sone://${localSone1.id}", post)
- val reply2 =
empty
PostReply("sone://${localSone1.id}", post, known = true)
+ val reply1 =
create
PostReply("sone://${localSone1.id}", post)
+ val reply2 =
create
PostReply("sone://${localSone1.id}", post, known = true)
postReplyProvider.postReplies[post.id] = listOf(reply1, reply2)
eventBus.post(NewPostReplyFoundEvent(reply1))
eventBus.post(PostReplyRemovedEvent(reply1))
postReplyProvider.postReplies[post.id] = listOf(reply1, reply2)
eventBus.post(NewPostReplyFoundEvent(reply1))
eventBus.post(PostReplyRemovedEvent(reply1))
diff --git
a/src/test/kotlin/net/pterodactylus/sone/web/notification/LocalReplyHandlerTest.kt
b/src/test/kotlin/net/pterodactylus/sone/web/notification/LocalReplyHandlerTest.kt
index
3532e77
..
1d30124
100644
(file)
--- a/
src/test/kotlin/net/pterodactylus/sone/web/notification/LocalReplyHandlerTest.kt
+++ b/
src/test/kotlin/net/pterodactylus/sone/web/notification/LocalReplyHandlerTest.kt
@@
-81,5
+81,5
@@
class LocalReplyHandlerTest {
}
}
-private val localReply =
empty
PostReply(sone = localSone1)
-private val remoteReply =
empty
PostReply()
+private val localReply =
create
PostReply(sone = localSone1)
+private val remoteReply =
create
PostReply()
diff --git
a/src/test/kotlin/net/pterodactylus/sone/web/notification/MarkPostReplyKnownDuringFirstStartHandlerTest.kt
b/src/test/kotlin/net/pterodactylus/sone/web/notification/MarkPostReplyKnownDuringFirstStartHandlerTest.kt
index
3cb463f
..
efd5454
100644
(file)
--- a/
src/test/kotlin/net/pterodactylus/sone/web/notification/MarkPostReplyKnownDuringFirstStartHandlerTest.kt
+++ b/
src/test/kotlin/net/pterodactylus/sone/web/notification/MarkPostReplyKnownDuringFirstStartHandlerTest.kt
@@
-32,7
+32,7
@@
class MarkPostReplyKnownDuringFirstStartHandlerTest {
private val markedAsKnown = mutableListOf<PostReply>()
private val notificationTester = NotificationHandlerTester { MarkPostReplyKnownDuringFirstStartHandler(it, Consumer { markedAsKnown += it }) }
private val markedAsKnown = mutableListOf<PostReply>()
private val notificationTester = NotificationHandlerTester { MarkPostReplyKnownDuringFirstStartHandler(it, Consumer { markedAsKnown += it }) }
- private val postReply =
empty
PostReply()
+ private val postReply =
create
PostReply()
@Test
fun `post reply is marked as known on new reply during first start`() {
@Test
fun `post reply is marked as known on new reply during first start`() {
diff --git
a/src/test/kotlin/net/pterodactylus/sone/web/notification/NotificationHandlerModuleTest.kt
b/src/test/kotlin/net/pterodactylus/sone/web/notification/NotificationHandlerModuleTest.kt
index
f22e23a
..
0a79cfe
100644
(file)
--- a/
src/test/kotlin/net/pterodactylus/sone/web/notification/NotificationHandlerModuleTest.kt
+++ b/
src/test/kotlin/net/pterodactylus/sone/web/notification/NotificationHandlerModuleTest.kt
@@
-205,7
+205,7
@@
class NotificationHandlerModuleTest {
fun `new-remote-post-reply notification has correct key and template`() {
loaders.templates += "/templates/notify/newReplyNotification.html" to "<% replies>".asTemplate()
val notification = injector.getInstance<ListNotification<PostReply>>(named("newRemotePostReply"))
fun `new-remote-post-reply notification has correct key and template`() {
loaders.templates += "/templates/notify/newReplyNotification.html" to "<% replies>".asTemplate()
val notification = injector.getInstance<ListNotification<PostReply>>(named("newRemotePostReply"))
- val postReplies = listOf(
emptyPostReply(), empty
PostReply())
+ val postReplies = listOf(
createPostReply(), create
PostReply())
postReplies.forEach(notification::add)
assertThat(notification.render(), equalTo(postReplies.toString()))
}
postReplies.forEach(notification::add)
assertThat(notification.render(), equalTo(postReplies.toString()))
}
@@
-282,7
+282,7
@@
class NotificationHandlerModuleTest {
fun `local-reply notification has correct key and template`() {
loaders.templates += "/templates/notify/newReplyNotification.html" to "<% replies>".asTemplate()
val notification = injector.getInstance<ListNotification<PostReply>>(named("localReply"))
fun `local-reply notification has correct key and template`() {
loaders.templates += "/templates/notify/newReplyNotification.html" to "<% replies>".asTemplate()
val notification = injector.getInstance<ListNotification<PostReply>>(named("localReply"))
- val replies = listOf(
emptyPostReply("reply1"), empty
PostReply("reply2"))
+ val replies = listOf(
createPostReply("reply1"), create
PostReply("reply2"))
replies.forEach(notification::add)
assertThat(notification.render(), equalTo(replies.toString()))
}
replies.forEach(notification::add)
assertThat(notification.render(), equalTo(replies.toString()))
}
diff --git
a/src/test/kotlin/net/pterodactylus/sone/web/notification/RemotePostReplyHandlerTest.kt
b/src/test/kotlin/net/pterodactylus/sone/web/notification/RemotePostReplyHandlerTest.kt
index
e4eb14f
..
15baa01
100644
(file)
--- a/
src/test/kotlin/net/pterodactylus/sone/web/notification/RemotePostReplyHandlerTest.kt
+++ b/
src/test/kotlin/net/pterodactylus/sone/web/notification/RemotePostReplyHandlerTest.kt
@@
-34,7
+34,7
@@
class RemotePostReplyHandlerTest {
private val notification = ListNotification<PostReply>("", "", Template())
private val notificationHandlerTester = NotificationHandlerTester { RemotePostReplyHandler(it, notification) }
private val notification = ListNotification<PostReply>("", "", Template())
private val notificationHandlerTester = NotificationHandlerTester { RemotePostReplyHandler(it, notification) }
- private val postReply =
empty
PostReply()
+ private val postReply =
create
PostReply()
@Test
fun `reply is added to notification on new reply`() {
@Test
fun `reply is added to notification on new reply`() {
@@
-64,14
+64,14
@@
class RemotePostReplyHandlerTest {
@Test
fun `reply is not added to notification on new local reply`() {
@Test
fun `reply is not added to notification on new local reply`() {
- val postReply =
empty
PostReply(sone = localSone1)
+ val postReply =
create
PostReply(sone = localSone1)
notificationHandlerTester.sendEvent(NewPostReplyFoundEvent(postReply))
assertThat(notification.elements, not(hasItem<PostReply>(postReply)))
}
@Test
fun `notification is not added to manager on new local reply`() {
notificationHandlerTester.sendEvent(NewPostReplyFoundEvent(postReply))
assertThat(notification.elements, not(hasItem<PostReply>(postReply)))
}
@Test
fun `notification is not added to manager on new local reply`() {
- val postReply =
empty
PostReply(sone = localSone1)
+ val postReply =
create
PostReply(sone = localSone1)
notificationHandlerTester.sendEvent(NewPostReplyFoundEvent(postReply))
assertThat(notificationHandlerTester.notifications, not(hasItem<Notification>(notification)))
}
notificationHandlerTester.sendEvent(NewPostReplyFoundEvent(postReply))
assertThat(notificationHandlerTester.notifications, not(hasItem<Notification>(notification)))
}