Mercurial > repos > IBBoard.WarFoundry.API.Tests
annotate API/Objects/Requirement/UnitCountRequirementDataTest.cs @ 176:9a1763af5fd2
Re #338: WarFoundry.API - Save System Data
* Add tests for saving point names
* Add expected values for new tests
* Add points names to existing expected values (because we don't know if they were default or not)
author | IBBoard <dev@ibboard.co.uk> |
---|---|
date | Wed, 26 Oct 2011 15:40:52 +0100 |
parents | 2ae80631ec9c |
children |
rev | line source |
---|---|
137
081b48413f6d
Re #140: Add equality methods to WarFoundry objects
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
1 // This file (UnitCountRequirementDataTest.cs) is a part of the IBBoard.WarFoundry.API.Tests project and is copyright 2011 IBBoard |
081b48413f6d
Re #140: Add equality methods to WarFoundry objects
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
2 // |
081b48413f6d
Re #140: Add equality methods to WarFoundry objects
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
3 // The file and the library/program it is in are licensed and distributed, without warranty, under the GNU Affero GPL license, either version 3 of the License or (at your option) any later version. Please see COPYING for more information and the full license. |
081b48413f6d
Re #140: Add equality methods to WarFoundry objects
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
4 using System; |
081b48413f6d
Re #140: Add equality methods to WarFoundry objects
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
5 using NUnit.Framework; |
081b48413f6d
Re #140: Add equality methods to WarFoundry objects
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
6 using IBBoard.NUnit; |
081b48413f6d
Re #140: Add equality methods to WarFoundry objects
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
7 using IBBoard.WarFoundry.API.Objects.Mock; |
081b48413f6d
Re #140: Add equality methods to WarFoundry objects
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
8 using IBBoard.WarFoundry.API.Factories; |
081b48413f6d
Re #140: Add equality methods to WarFoundry objects
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
9 using System.Reflection; |
081b48413f6d
Re #140: Add equality methods to WarFoundry objects
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
10 |
081b48413f6d
Re #140: Add equality methods to WarFoundry objects
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
11 namespace IBBoard.WarFoundry.API.Objects.Requirement |
081b48413f6d
Re #140: Add equality methods to WarFoundry objects
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
12 { |
081b48413f6d
Re #140: Add equality methods to WarFoundry objects
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
13 [TestFixture()] |
081b48413f6d
Re #140: Add equality methods to WarFoundry objects
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
14 public class UnitCountRequirementDataTest : AbstractEqualityTest<UnitCountRequirementData> |
140
2ae80631ec9c
* Remove duplicate equality test code now that Mike Krueger fixed MonoDevelop bug 677228 (https://bugzilla.novell.com/show_bug.cgi?id=677228#c5)
IBBoard <dev@ibboard.co.uk>
parents:
137
diff
changeset
|
15 { |
137
081b48413f6d
Re #140: Add equality methods to WarFoundry objects
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
16 public override UnitCountRequirementData GetObject () |
081b48413f6d
Re #140: Add equality methods to WarFoundry objects
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
17 { |
081b48413f6d
Re #140: Add equality methods to WarFoundry objects
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
18 return new UnitCountRequirementData(new MockUnitType(), 1); |
081b48413f6d
Re #140: Add equality methods to WarFoundry objects
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
19 } |
081b48413f6d
Re #140: Add equality methods to WarFoundry objects
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
20 |
081b48413f6d
Re #140: Add equality methods to WarFoundry objects
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
21 public override UnitCountRequirementData GetSameObject () |
081b48413f6d
Re #140: Add equality methods to WarFoundry objects
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
22 { |
081b48413f6d
Re #140: Add equality methods to WarFoundry objects
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
23 return new UnitCountRequirementData(new MockUnitType(), 1); |
081b48413f6d
Re #140: Add equality methods to WarFoundry objects
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
24 } |
081b48413f6d
Re #140: Add equality methods to WarFoundry objects
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
25 |
081b48413f6d
Re #140: Add equality methods to WarFoundry objects
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
26 public override UnitCountRequirementData GetDifferentObject () |
081b48413f6d
Re #140: Add equality methods to WarFoundry objects
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
27 { |
081b48413f6d
Re #140: Add equality methods to WarFoundry objects
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
28 DummyWarFoundryFactory factory = new DummyWarFoundryFactory(); |
081b48413f6d
Re #140: Add equality methods to WarFoundry objects
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
29 GameSystem gameSystem = new GameSystem("system", "system", factory); |
081b48413f6d
Re #140: Add equality methods to WarFoundry objects
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
30 Race race = new Race("race", "race", gameSystem, factory); |
081b48413f6d
Re #140: Add equality methods to WarFoundry objects
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
31 return new UnitCountRequirementData(new UnitType("id9", "some name", race), 2); |
081b48413f6d
Re #140: Add equality methods to WarFoundry objects
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
32 } |
081b48413f6d
Re #140: Add equality methods to WarFoundry objects
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
33 } |
081b48413f6d
Re #140: Add equality methods to WarFoundry objects
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
34 } |
081b48413f6d
Re #140: Add equality methods to WarFoundry objects
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
35 |