From b45b461a8fd4dc1aa6359979badf2a19693b86b8 Mon Sep 17 00:00:00 2001 From: "Leonardo Demartino (Delek)" Date: Mon, 18 Jul 2016 11:41:22 -0300 Subject: [PATCH] Added Long conversion to some test units Fixed the long issue on Test units too. --- .../java/de/vivistra/telegrambot/model/TestUser.java | 10 +++++----- .../telegrambot/model/message/TestMessageFactory.java | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/test/java/de/vivistra/telegrambot/model/TestUser.java b/src/test/java/de/vivistra/telegrambot/model/TestUser.java index 96a8426..7ae8288 100644 --- a/src/test/java/de/vivistra/telegrambot/model/TestUser.java +++ b/src/test/java/de/vivistra/telegrambot/model/TestUser.java @@ -8,14 +8,14 @@ public class TestUser { @Test public void testConstructorAndGetter() { - User peter = new User(1, "Peter", "Mueller", "PeMu"); + User peter = new User(1L, "Peter", "Mueller", "PeMu"); assertTrue(1 == peter.getId()); assertEquals("Peter", peter.getFirstName()); assertEquals("Mueller", peter.getLastName()); assertEquals("PeMu", peter.getUserName()); - User bot = new User(-1, "Bot", null, null); + User bot = new User(-1L, "Bot", null, null); assertTrue(-1 == bot.getId()); assertEquals("Bot", bot.getFirstName()); @@ -25,7 +25,7 @@ public void testConstructorAndGetter() { @Test(expected = IllegalArgumentException.class) public void testConstructorWithIllegalFirstName() { - new User(0, null, null, null); + new User(0L, null, null, null); } @Test(expected = IllegalArgumentException.class) @@ -35,11 +35,11 @@ public void testConstructorWithIllegalId() { @Test public void testToString() { - User peter = new User(1, "Peter", "Mueller", "PeMu"); + User peter = new User(1L, "Peter", "Mueller", "PeMu"); assertEquals("Peter Mueller [PeMu@1]", peter.toString()); - User bot = new User(-1, "Bot", null, null); + User bot = new User(-1L, "Bot", null, null); assertEquals("Bot [-1]", bot.toString()); } diff --git a/src/test/java/de/vivistra/telegrambot/model/message/TestMessageFactory.java b/src/test/java/de/vivistra/telegrambot/model/message/TestMessageFactory.java index ded4077..109dcf2 100644 --- a/src/test/java/de/vivistra/telegrambot/model/message/TestMessageFactory.java +++ b/src/test/java/de/vivistra/telegrambot/model/message/TestMessageFactory.java @@ -47,7 +47,7 @@ public void testFromJSON() { assertNull(message.getGroupChat()); - User sender = new User(7872355, "Marcel", "", "Marcn"); + User sender = new User(7872355L, "Marcel", "", "Marcn"); assertEquals(sender, message.getSender()); }