Skip to content
This repository has been archived by the owner on May 9, 2023. It is now read-only.

Commit

Permalink
Added Long conversion to some test units
Browse files Browse the repository at this point in the history
Fixed the long issue on Test units too.
  • Loading branch information
LeonardoDemartino committed Jul 18, 2016
1 parent 58794d7 commit b45b461
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions src/test/java/de/vivistra/telegrambot/model/TestUser.java
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand All @@ -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)
Expand All @@ -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());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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());
}
Expand Down

0 comments on commit b45b461

Please sign in to comment.