[grilo-plugins] test: Add a test for Shatterhand game



commit e5c9aba3837dbce14ab96c9fff68641a7d5b03f1
Author: Exalm <exalm7659 gmail com>
Date:   Wed Apr 18 20:30:13 2018 +0500

    test: Add a test for Shatterhand game
    
    This is a case of thegamesdb returning only one search result.
    
    This test is expected to fail.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=794504

 tests/games/data/network-data.ini                 |    6 +++
 tests/games/data/resolve-getgame-shatterhand.data |   41 +++++++++++++++++++++
 tests/games/data/resolve-shatterhand.data         |   10 +++++
 tests/games/test_games.c                          |    7 ++++
 4 files changed, 64 insertions(+), 0 deletions(-)
---
diff --git a/tests/games/data/network-data.ini b/tests/games/data/network-data.ini
index 2e1dd5d..8a4ffe7 100644
--- a/tests/games/data/network-data.ini
+++ b/tests/games/data/network-data.ini
@@ -36,3 +36,9 @@ data=resolve-sonic.data
 
 [http://thegamesdb.net/api/GetGame.php?id=5754]
 data=resolve-getgame-sonic.data
+
+[http://thegamesdb.net/api/GetGamesList.php?name=Shatterhand&platform=Nintendo%20Entertainment%20System%20%28NES%29]
+data=resolve-shatterhand.data
+
+[http://thegamesdb.net/api/GetGame.php?id=22619]
+data=resolve-getgame-shatterhand.data
diff --git a/tests/games/data/resolve-getgame-shatterhand.data 
b/tests/games/data/resolve-getgame-shatterhand.data
new file mode 100644
index 0000000..1cd41da
--- /dev/null
+++ b/tests/games/data/resolve-getgame-shatterhand.data
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+
+<Data>
+<baseImgUrl>http://thegamesdb.net/banners/</baseImgUrl>
+<Game>
+<id>22619</id>
+<GameTitle>Shatterhand</GameTitle>
+<PlatformId>7</PlatformId>
+<Platform>Nintendo Entertainment System (NES)</Platform>
+<ReleaseDate>12/01/1991</ReleaseDate>
+<Overview>Imagine packing the power of 100 strategic missiles in every punch. Imagine needing every single 
megaton just to hold your own against a cybernetic army of metallic monstrosities. That's the guts of 
SHATTERHAND, the game that redefines hand-to-hand combat in the 21st century... along with all the standards 
for single-player action games for the NES. Seven levels of programmed adventure - you choose the action! 
State-of-the-art graphics featuring 8-direction scrolling! "Anti-gravity" levels force you to fight 
upside-down! Armed "satellite robots" assist you in battle. No arms on Earth can withstand the power in your 
hands!</Overview>
+<Genres><genre>Action</genre><genre>Platform</genre></Genres><Players>1</Players><Co-op>No</Co-op>
+<Youtube>http://www.youtube.com/watch?v=R1VCf_pDSKY</Youtube>
+<Publisher>Jaleco</Publisher>
+<Developer>Natsume</Developer>
+<Rating>10</Rating><Images>
+<boxart side="back" width="640" height="905" 
thumb="boxart/thumb/original/back/22619-1.jpg">boxart/original/back/22619-1.jpg</boxart>
+<boxart side="front" width="640" height="908" 
thumb="boxart/thumb/original/front/22619-1.jpg">boxart/original/front/22619-1.jpg</boxart>
+<banner width="760" height="140">graphical/22619-g.jpg</banner><screenshot>
+<original width="540" height="405">screenshots/22619-1.jpg</original>
+<thumb>screenshots/thumb/22619-1.jpg</thumb>
+</screenshot>
+<screenshot>
+<original width="540" height="454">screenshots/22619-2.jpg</original>
+<thumb>screenshots/thumb/22619-2.jpg</thumb>
+</screenshot>
+<screenshot>
+<original width="540" height="447">screenshots/22619-3.jpg</original>
+<thumb>screenshots/thumb/22619-3.jpg</thumb>
+</screenshot>
+<screenshot>
+<original width="540" height="473">screenshots/22619-4.jpg</original>
+<thumb>screenshots/thumb/22619-4.jpg</thumb>
+</screenshot>
+<screenshot>
+<original width="512" height="464">screenshots/22619-5.jpg</original>
+<thumb>screenshots/thumb/22619-5.jpg</thumb>
+</screenshot>
+<clearlogo width="400" height="261">clearlogo/22619.png</clearlogo></Images>
+</Game>
+</Data>
diff --git a/tests/games/data/resolve-shatterhand.data b/tests/games/data/resolve-shatterhand.data
new file mode 100644
index 0000000..9b91558
--- /dev/null
+++ b/tests/games/data/resolve-shatterhand.data
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+
+<Data>
+<Game>
+<id>22619</id>
+<GameTitle>Shatterhand</GameTitle>
+<ReleaseDate>12/01/1991</ReleaseDate>
+<Platform>Nintendo Entertainment System (NES)</Platform>
+</Game>
+</Data>
diff --git a/tests/games/test_games.c b/tests/games/test_games.c
index b771dd8..11915c5 100644
--- a/tests/games/test_games.c
+++ b/tests/games/test_games.c
@@ -196,6 +196,13 @@ test_resolve_thumbnails_found (void)
                                 0,
                                 "http://thegamesdb.net/banners/boxart/original/front/11837-1.jpg";);
 
+  test_resolve_thumbnail_found (source, keys, options,
+                                "Shatterhand",
+                                "application/x-nes-rom",
+                                NULL,
+                                0,
+                                "http://thegamesdb.net/banners/boxart/original/front/22619-1.jpg";);
+
   g_list_free (keys);
   g_object_unref (options);
 }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]