[longomatch] Add test to load players
- From: Andoni Morales Alastruey <amorales src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [longomatch] Add test to load players
- Date: Wed, 18 Mar 2015 14:45:24 +0000 (UTC)
commit 4966be667b678683c15ab9c149264319c516ea41
Author: Andoni Morales Alastruey <ylatuya gmail com>
Date: Mon Mar 16 13:03:51 2015 +0100
Add test to load players
Tests/DB/TestStorage.cs | 11 +++++++++++
1 files changed, 11 insertions(+), 0 deletions(-)
---
diff --git a/Tests/DB/TestStorage.cs b/Tests/DB/TestStorage.cs
index 8b84ad6..d0d3e17 100644
--- a/Tests/DB/TestStorage.cs
+++ b/Tests/DB/TestStorage.cs
@@ -177,6 +177,17 @@ namespace Tests.DB
[Test ()]
public void TestLoadPlayer ()
{
+ Player player1 = new Player {Name = "andoni", Position = "runner",
+ Number = 5, Birthday = new DateTime (1984, 6, 11),
+ Nationality = "spanish", Height = 1.73f, Weight = 70,
+ Playing = true, Mail = "test test", Color = Color.Red
+ };
+ player1.Photo = Utils.LoadImageFromFile ();
+ storage.Store (player1);
+ Player player2 = storage.Retrieve<Player> (player1.ID);
+ Assert.AreEqual (player1.ID, player2.ID);
+ Assert.AreEqual (player1.ToString (), player2.ToString ());
+ Assert.AreEqual (player1.Photo.Width, player2.Photo.Width);
}
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]