annotate API/Objects/GameSystemTest.cs @ 82:bbcc46371364

Re #99: Define "points" values in GameSystem * Add unit tests
author IBBoard <dev@ibboard.co.uk>
date Sun, 13 Feb 2011 21:02:47 +0000
parents
children 168c5aab34bb
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
82
bbcc46371364 Re #99: Define "points" values in GameSystem
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
1 using System;
bbcc46371364 Re #99: Define "points" values in GameSystem
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
2 using NUnit.Framework;
bbcc46371364 Re #99: Define "points" values in GameSystem
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
3 using IBBoard.WarFoundry.API.Factories;
bbcc46371364 Re #99: Define "points" values in GameSystem
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
4 using NUnit.Framework.SyntaxHelpers;
bbcc46371364 Re #99: Define "points" values in GameSystem
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
5
bbcc46371364 Re #99: Define "points" values in GameSystem
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
6 namespace IBBoard.WarFoundry.API.Objects
bbcc46371364 Re #99: Define "points" values in GameSystem
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
7 {
bbcc46371364 Re #99: Define "points" values in GameSystem
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
8 [TestFixture()]
bbcc46371364 Re #99: Define "points" values in GameSystem
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
9 public class GameSystemTest
bbcc46371364 Re #99: Define "points" values in GameSystem
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
10 {
bbcc46371364 Re #99: Define "points" values in GameSystem
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
11 [Test()]
bbcc46371364 Re #99: Define "points" values in GameSystem
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
12 public void TestPointsSingularAbbreviation ()
bbcc46371364 Re #99: Define "points" values in GameSystem
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
13 {
bbcc46371364 Re #99: Define "points" values in GameSystem
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
14 GameSystem system = new GameSystem("id", "name", new DummyWarFoundryFactory());
bbcc46371364 Re #99: Define "points" values in GameSystem
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
15 Assert.That(system.GetPointsAbbrev(1), Is.EqualTo(""));
bbcc46371364 Re #99: Define "points" values in GameSystem
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
16 system.SystemPtsAbbrevSingle = "pt";
bbcc46371364 Re #99: Define "points" values in GameSystem
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
17 system.SystemPtsAbbrevPlural = "pts";
bbcc46371364 Re #99: Define "points" values in GameSystem
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
18 Assert.That(system.GetPointsAbbrev(1), Is.EqualTo("pt"));
bbcc46371364 Re #99: Define "points" values in GameSystem
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
19 }
bbcc46371364 Re #99: Define "points" values in GameSystem
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
20
bbcc46371364 Re #99: Define "points" values in GameSystem
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
21 [Test()]
bbcc46371364 Re #99: Define "points" values in GameSystem
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
22 public void TestPointsPluralAbbreviation ()
bbcc46371364 Re #99: Define "points" values in GameSystem
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
23 {
bbcc46371364 Re #99: Define "points" values in GameSystem
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
24 GameSystem system = new GameSystem("id", "name", new DummyWarFoundryFactory());
bbcc46371364 Re #99: Define "points" values in GameSystem
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
25 Assert.That(system.GetPointsAbbrev(2), Is.EqualTo(""));
bbcc46371364 Re #99: Define "points" values in GameSystem
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
26 system.SystemPtsAbbrevSingle = "pt";
bbcc46371364 Re #99: Define "points" values in GameSystem
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
27 system.SystemPtsAbbrevPlural = "pts";
bbcc46371364 Re #99: Define "points" values in GameSystem
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
28 Assert.That(system.GetPointsAbbrev(2), Is.EqualTo("pts"));
bbcc46371364 Re #99: Define "points" values in GameSystem
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
29 }
bbcc46371364 Re #99: Define "points" values in GameSystem
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
30
bbcc46371364 Re #99: Define "points" values in GameSystem
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
31 [Test()]
bbcc46371364 Re #99: Define "points" values in GameSystem
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
32 public void TestPointsZeroAbbreviation ()
bbcc46371364 Re #99: Define "points" values in GameSystem
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
33 {
bbcc46371364 Re #99: Define "points" values in GameSystem
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
34 GameSystem system = new GameSystem("id", "name", new DummyWarFoundryFactory());
bbcc46371364 Re #99: Define "points" values in GameSystem
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
35 Assert.That(system.GetPointsAbbrev(0), Is.EqualTo(""));
bbcc46371364 Re #99: Define "points" values in GameSystem
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
36 system.SystemPtsAbbrevSingle = "pt";
bbcc46371364 Re #99: Define "points" values in GameSystem
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
37 system.SystemPtsAbbrevPlural = "pts";
bbcc46371364 Re #99: Define "points" values in GameSystem
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
38 Assert.That(system.GetPointsAbbrev(0), Is.EqualTo("pts"));
bbcc46371364 Re #99: Define "points" values in GameSystem
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
39 }
bbcc46371364 Re #99: Define "points" values in GameSystem
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
40
bbcc46371364 Re #99: Define "points" values in GameSystem
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
41 [Test()]
bbcc46371364 Re #99: Define "points" values in GameSystem
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
42 public void TestPointsSingularName ()
bbcc46371364 Re #99: Define "points" values in GameSystem
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
43 {
bbcc46371364 Re #99: Define "points" values in GameSystem
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
44 GameSystem system = new GameSystem("id", "name", new DummyWarFoundryFactory());
bbcc46371364 Re #99: Define "points" values in GameSystem
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
45 Assert.That(system.GetPointsName(1), Is.EqualTo(""));
bbcc46371364 Re #99: Define "points" values in GameSystem
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
46 system.SystemPtsNameSingle = "pt";
bbcc46371364 Re #99: Define "points" values in GameSystem
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
47 system.SystemPtsNamePlural = "pts";
bbcc46371364 Re #99: Define "points" values in GameSystem
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
48 Assert.That(system.GetPointsName(1), Is.EqualTo("pt"));
bbcc46371364 Re #99: Define "points" values in GameSystem
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
49 }
bbcc46371364 Re #99: Define "points" values in GameSystem
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
50
bbcc46371364 Re #99: Define "points" values in GameSystem
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
51 [Test()]
bbcc46371364 Re #99: Define "points" values in GameSystem
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
52 public void TestPointsPluralName ()
bbcc46371364 Re #99: Define "points" values in GameSystem
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
53 {
bbcc46371364 Re #99: Define "points" values in GameSystem
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
54 GameSystem system = new GameSystem("id", "name", new DummyWarFoundryFactory());
bbcc46371364 Re #99: Define "points" values in GameSystem
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
55 Assert.That(system.GetPointsName(2), Is.EqualTo(""));
bbcc46371364 Re #99: Define "points" values in GameSystem
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
56 system.SystemPtsNameSingle = "pt";
bbcc46371364 Re #99: Define "points" values in GameSystem
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
57 system.SystemPtsNamePlural = "pts";
bbcc46371364 Re #99: Define "points" values in GameSystem
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
58 Assert.That(system.GetPointsName(2), Is.EqualTo("pts"));
bbcc46371364 Re #99: Define "points" values in GameSystem
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
59 }
bbcc46371364 Re #99: Define "points" values in GameSystem
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
60
bbcc46371364 Re #99: Define "points" values in GameSystem
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
61 [Test()]
bbcc46371364 Re #99: Define "points" values in GameSystem
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
62 public void TestPointsZeroName ()
bbcc46371364 Re #99: Define "points" values in GameSystem
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
63 {
bbcc46371364 Re #99: Define "points" values in GameSystem
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
64 GameSystem system = new GameSystem("id", "name", new DummyWarFoundryFactory());
bbcc46371364 Re #99: Define "points" values in GameSystem
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
65 Assert.That(system.GetPointsName(0), Is.EqualTo(""));
bbcc46371364 Re #99: Define "points" values in GameSystem
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
66 system.SystemPtsNameSingle = "pt";
bbcc46371364 Re #99: Define "points" values in GameSystem
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
67 system.SystemPtsNamePlural = "pts";
bbcc46371364 Re #99: Define "points" values in GameSystem
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
68 Assert.That(system.GetPointsName(0), Is.EqualTo("pts"));
bbcc46371364 Re #99: Define "points" values in GameSystem
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
69 }
bbcc46371364 Re #99: Define "points" values in GameSystem
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
70
bbcc46371364 Re #99: Define "points" values in GameSystem
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
71 }
bbcc46371364 Re #99: Define "points" values in GameSystem
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
72 }
bbcc46371364 Re #99: Define "points" values in GameSystem
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
73