Skip to content
This repository has been archived by the owner on Dec 18, 2018. It is now read-only.

Commit

Permalink
Added puzzle for integration test
Browse files Browse the repository at this point in the history
  • Loading branch information
SherifWaly committed Apr 28, 2017
1 parent 804dde9 commit 4489e6c
Showing 1 changed file with 14 additions and 10 deletions.
24 changes: 14 additions & 10 deletions src/test/java/com/amihaiemil/versioneye/RtFavoritesTestCase.java
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
* @author Sherif Waly ([email protected])
* @version $Id$
* @since 1.0.0
* @todo #40:15min/DEV Add integration tests for RtFavorites.
*/

@SuppressWarnings("resource")
Expand All @@ -71,39 +72,42 @@ public void fetchesFavorites() throws IOException {
);

final List<Favorite> fetched = favorites.fetch(1);

MatcherAssert.assertThat(fetched.size(), Matchers.is(2));

Favorite favorite = fetched.get(0);
MatcherAssert.assertThat(
fetched.get(0).name(), Matchers.equalTo("doctrine/common")
favorite.name(), Matchers.equalTo("doctrine/common")
);
MatcherAssert.assertThat(
fetched.get(0).language(), Matchers.equalTo("php")
favorite.language(), Matchers.equalTo("php")
);
MatcherAssert.assertThat(
fetched.get(0).productKey(), Matchers.equalTo("doctrine/common")
favorite.productKey(), Matchers.equalTo("doctrine/common")
);
MatcherAssert.assertThat(
fetched.get(0).version(), Matchers.equalTo("2.7.2")
favorite.version(), Matchers.equalTo("2.7.2")
);
MatcherAssert.assertThat(
fetched.get(0).productType(), Matchers.equalTo("composer")
favorite.productType(), Matchers.equalTo("composer")
);

favorite = fetched.get(1);
MatcherAssert.assertThat(
fetched.get(1).name(), Matchers.equalTo("doctrine/doctrine-module")
favorite.name(), Matchers.equalTo("doctrine/doctrine-module")
);
MatcherAssert.assertThat(
fetched.get(1).language(), Matchers.equalTo("php")
favorite.language(), Matchers.equalTo("php")
);
MatcherAssert.assertThat(
fetched.get(1).productKey(),
favorite.productKey(),
Matchers.equalTo("doctrine/doctrine-module")
);
MatcherAssert.assertThat(
fetched.get(1).version(), Matchers.equalTo("2.0.0")
favorite.version(), Matchers.equalTo("2.0.0")
);
MatcherAssert.assertThat(
fetched.get(1).productType(), Matchers.equalTo("composer")
favorite.productType(), Matchers.equalTo("composer")
);

MatcherAssert.assertThat(
Expand Down

2 comments on commit 4489e6c

@0pdd
Copy link

@0pdd 0pdd commented on 4489e6c Apr 28, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Puzzle 20-6a798f06 disappeared, that's why I closed as #40

@0pdd
Copy link

@0pdd 0pdd commented on 4489e6c Apr 28, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Puzzle 40-c1757649 discovered and submitted as #42

Please sign in to comment.