@Test
fun `request without parameters lists all sones`() {
- val replyParameters = command.execute(parameters).replyParameters
+ val replyParameters = command.execute(parameters).replyParameters
assertThat(replyParameters["Message"], equalTo("Sones"))
assertThat(replyParameters["Sones.Count"], equalTo("3"))
@Test
fun `skipping the first sone lists the last two sones`() {
parameters += "StartSone" to "1"
- val replyParameters = command.execute(parameters).replyParameters
+ val replyParameters = command.execute(parameters).replyParameters
assertThat(replyParameters["Message"], equalTo("Sones"))
assertThat(replyParameters["Sones.Count"], equalTo("2"))
@Test
fun `requesting only two sones lists the first two sones`() {
parameters += "MaxSones" to "2"
- val replyParameters = command.execute(parameters).replyParameters
+ val replyParameters = command.execute(parameters).replyParameters
assertThat(replyParameters["Message"], equalTo("Sones"))
assertThat(replyParameters["Sones.Count"], equalTo("2"))
@Test
fun `skipping more sones than there are lists no sones`() {
parameters += "StartSone" to "20"
- val replyParameters = command.execute(parameters).replyParameters
+ val replyParameters = command.execute(parameters).replyParameters
assertThat(replyParameters["Message"], equalTo("Sones"))
assertThat(replyParameters["Sones.Count"], equalTo("0"))
*/
class LikePostCommandTest : SoneCommandTest() {
- private val post = createPost("PostId", mock<Sone>(), null, 1000, "Text")
+ private val post = createPost("PostId", mock<Sone>(), null, 1000, "Text")
override fun createCommand(core: Core) = LikePostCommand(core)
@Test
fun `request without parameters results in FCP exception`() {
- requestWithoutAnyParameterResultsInFcpException()
+ requestWithoutAnyParameterResultsInFcpException()
}
@Test
@Test
fun `request with missing local sone results in FCP exception`() {
- parameters += "Post" to "PostId"
+ parameters += "Post" to "PostId"
expectedException.expect(FcpException::class.java)
command.execute(parameters)
}