Mercurial > repos > IBDev-IBBoard.WarFoundry.API.Tests
annotate API/Objects/RaceTests.cs @ 139:3e4864e206ea
Re #140: Equality methods
* Add equality testing to RequiresNoMoreThanN requirement
* Add extra different races for testing more of equality method
author | IBBoard <dev@ibboard.co.uk> |
---|---|
date | Tue, 26 Apr 2011 19:47:36 +0000 |
parents | 081b48413f6d |
children | 2ae80631ec9c |
rev | line source |
---|---|
137
081b48413f6d
Re #140: Add equality methods to WarFoundry objects
IBBoard <dev@ibboard.co.uk>
parents:
129
diff
changeset
|
1 // This file (RaceTests.cs) is a part of the IBBoard.WarFoundry.API.Tests project and is copyright 2011 IBBoard |
126
6571b6483d2d
* Set target framework to v2.0...AGAIN
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
2 // |
6571b6483d2d
* Set target framework to v2.0...AGAIN
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. |
6571b6483d2d
* Set target framework to v2.0...AGAIN
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
4 using System; |
137
081b48413f6d
Re #140: Add equality methods to WarFoundry objects
IBBoard <dev@ibboard.co.uk>
parents:
129
diff
changeset
|
5 using NUnit.Framework; |
081b48413f6d
Re #140: Add equality methods to WarFoundry objects
IBBoard <dev@ibboard.co.uk>
parents:
129
diff
changeset
|
6 using IBBoard.WarFoundry.API.Objects.Mock; |
081b48413f6d
Re #140: Add equality methods to WarFoundry objects
IBBoard <dev@ibboard.co.uk>
parents:
129
diff
changeset
|
7 using NUnit.Framework.SyntaxHelpers; |
081b48413f6d
Re #140: Add equality methods to WarFoundry objects
IBBoard <dev@ibboard.co.uk>
parents:
129
diff
changeset
|
8 using IBBoard.WarFoundry.API.Objects.Requirement; |
081b48413f6d
Re #140: Add equality methods to WarFoundry objects
IBBoard <dev@ibboard.co.uk>
parents:
129
diff
changeset
|
9 using System.Collections.Generic; |
081b48413f6d
Re #140: Add equality methods to WarFoundry objects
IBBoard <dev@ibboard.co.uk>
parents:
129
diff
changeset
|
10 using IBBoard.NUnit; |
081b48413f6d
Re #140: Add equality methods to WarFoundry objects
IBBoard <dev@ibboard.co.uk>
parents:
129
diff
changeset
|
11 using System.Reflection; |
081b48413f6d
Re #140: Add equality methods to WarFoundry objects
IBBoard <dev@ibboard.co.uk>
parents:
129
diff
changeset
|
12 using IBBoard.WarFoundry.API.Factories; |
126
6571b6483d2d
* Set target framework to v2.0...AGAIN
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
13 |
6571b6483d2d
* Set target framework to v2.0...AGAIN
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
14 namespace IBBoard.WarFoundry.API.Objects |
6571b6483d2d
* Set target framework to v2.0...AGAIN
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
15 { |
6571b6483d2d
* Set target framework to v2.0...AGAIN
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
16 [TestFixture()] |
137
081b48413f6d
Re #140: Add equality methods to WarFoundry objects
IBBoard <dev@ibboard.co.uk>
parents:
129
diff
changeset
|
17 public class RaceTests : AbstractEqualityTest<Race> |
126
6571b6483d2d
* Set target framework to v2.0...AGAIN
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
18 { |
137
081b48413f6d
Re #140: Add equality methods to WarFoundry objects
IBBoard <dev@ibboard.co.uk>
parents:
129
diff
changeset
|
19 //FIXME We shouldn't duplicate these tests, but it is broken at the moment |
081b48413f6d
Re #140: Add equality methods to WarFoundry objects
IBBoard <dev@ibboard.co.uk>
parents:
129
diff
changeset
|
20 [Test] |
081b48413f6d
Re #140: Add equality methods to WarFoundry objects
IBBoard <dev@ibboard.co.uk>
parents:
129
diff
changeset
|
21 public void TestEquality() |
081b48413f6d
Re #140: Add equality methods to WarFoundry objects
IBBoard <dev@ibboard.co.uk>
parents:
129
diff
changeset
|
22 { |
081b48413f6d
Re #140: Add equality methods to WarFoundry objects
IBBoard <dev@ibboard.co.uk>
parents:
129
diff
changeset
|
23 Assert.AreEqual(GetObject(), GetSameObject()); |
081b48413f6d
Re #140: Add equality methods to WarFoundry objects
IBBoard <dev@ibboard.co.uk>
parents:
129
diff
changeset
|
24 Assert.AreEqual(GetSameObject(), GetObject()); |
081b48413f6d
Re #140: Add equality methods to WarFoundry objects
IBBoard <dev@ibboard.co.uk>
parents:
129
diff
changeset
|
25 } |
081b48413f6d
Re #140: Add equality methods to WarFoundry objects
IBBoard <dev@ibboard.co.uk>
parents:
129
diff
changeset
|
26 |
081b48413f6d
Re #140: Add equality methods to WarFoundry objects
IBBoard <dev@ibboard.co.uk>
parents:
129
diff
changeset
|
27 [Test] |
081b48413f6d
Re #140: Add equality methods to WarFoundry objects
IBBoard <dev@ibboard.co.uk>
parents:
129
diff
changeset
|
28 public void TestInequality() |
081b48413f6d
Re #140: Add equality methods to WarFoundry objects
IBBoard <dev@ibboard.co.uk>
parents:
129
diff
changeset
|
29 { |
081b48413f6d
Re #140: Add equality methods to WarFoundry objects
IBBoard <dev@ibboard.co.uk>
parents:
129
diff
changeset
|
30 Assert.AreNotEqual(GetObject(), GetDifferentObject()); |
081b48413f6d
Re #140: Add equality methods to WarFoundry objects
IBBoard <dev@ibboard.co.uk>
parents:
129
diff
changeset
|
31 Assert.AreNotEqual(GetSameObject(), GetDifferentObject()); |
081b48413f6d
Re #140: Add equality methods to WarFoundry objects
IBBoard <dev@ibboard.co.uk>
parents:
129
diff
changeset
|
32 Assert.AreNotEqual(GetDifferentObject(), GetObject()); |
081b48413f6d
Re #140: Add equality methods to WarFoundry objects
IBBoard <dev@ibboard.co.uk>
parents:
129
diff
changeset
|
33 Assert.AreNotEqual(GetDifferentObject(), GetSameObject()); |
081b48413f6d
Re #140: Add equality methods to WarFoundry objects
IBBoard <dev@ibboard.co.uk>
parents:
129
diff
changeset
|
34 } |
081b48413f6d
Re #140: Add equality methods to WarFoundry objects
IBBoard <dev@ibboard.co.uk>
parents:
129
diff
changeset
|
35 |
081b48413f6d
Re #140: Add equality methods to WarFoundry objects
IBBoard <dev@ibboard.co.uk>
parents:
129
diff
changeset
|
36 [Test] |
081b48413f6d
Re #140: Add equality methods to WarFoundry objects
IBBoard <dev@ibboard.co.uk>
parents:
129
diff
changeset
|
37 public void TestReflexiveEquality() |
081b48413f6d
Re #140: Add equality methods to WarFoundry objects
IBBoard <dev@ibboard.co.uk>
parents:
129
diff
changeset
|
38 { |
081b48413f6d
Re #140: Add equality methods to WarFoundry objects
IBBoard <dev@ibboard.co.uk>
parents:
129
diff
changeset
|
39 Assert.AreEqual(GetObject(), GetObject()); |
081b48413f6d
Re #140: Add equality methods to WarFoundry objects
IBBoard <dev@ibboard.co.uk>
parents:
129
diff
changeset
|
40 Assert.AreEqual(GetSameObject(), GetSameObject()); |
081b48413f6d
Re #140: Add equality methods to WarFoundry objects
IBBoard <dev@ibboard.co.uk>
parents:
129
diff
changeset
|
41 Assert.AreEqual(GetDifferentObject(), GetDifferentObject()); |
081b48413f6d
Re #140: Add equality methods to WarFoundry objects
IBBoard <dev@ibboard.co.uk>
parents:
129
diff
changeset
|
42 } |
081b48413f6d
Re #140: Add equality methods to WarFoundry objects
IBBoard <dev@ibboard.co.uk>
parents:
129
diff
changeset
|
43 |
081b48413f6d
Re #140: Add equality methods to WarFoundry objects
IBBoard <dev@ibboard.co.uk>
parents:
129
diff
changeset
|
44 [Test] |
081b48413f6d
Re #140: Add equality methods to WarFoundry objects
IBBoard <dev@ibboard.co.uk>
parents:
129
diff
changeset
|
45 public void TestOtherInequality() |
081b48413f6d
Re #140: Add equality methods to WarFoundry objects
IBBoard <dev@ibboard.co.uk>
parents:
129
diff
changeset
|
46 { |
081b48413f6d
Re #140: Add equality methods to WarFoundry objects
IBBoard <dev@ibboard.co.uk>
parents:
129
diff
changeset
|
47 MethodInfo[] methodInfo = GetType().GetMethods(); |
081b48413f6d
Re #140: Add equality methods to WarFoundry objects
IBBoard <dev@ibboard.co.uk>
parents:
129
diff
changeset
|
48 Race obj = GetObject(); |
081b48413f6d
Re #140: Add equality methods to WarFoundry objects
IBBoard <dev@ibboard.co.uk>
parents:
129
diff
changeset
|
49 |
081b48413f6d
Re #140: Add equality methods to WarFoundry objects
IBBoard <dev@ibboard.co.uk>
parents:
129
diff
changeset
|
50 foreach (MethodInfo method in methodInfo) |
081b48413f6d
Re #140: Add equality methods to WarFoundry objects
IBBoard <dev@ibboard.co.uk>
parents:
129
diff
changeset
|
51 { |
081b48413f6d
Re #140: Add equality methods to WarFoundry objects
IBBoard <dev@ibboard.co.uk>
parents:
129
diff
changeset
|
52 if (method.Name.StartsWith("GetOtherDifferent")) |
081b48413f6d
Re #140: Add equality methods to WarFoundry objects
IBBoard <dev@ibboard.co.uk>
parents:
129
diff
changeset
|
53 { |
081b48413f6d
Re #140: Add equality methods to WarFoundry objects
IBBoard <dev@ibboard.co.uk>
parents:
129
diff
changeset
|
54 Race otherObj = (Race)method.Invoke(this, new object[0]); |
081b48413f6d
Re #140: Add equality methods to WarFoundry objects
IBBoard <dev@ibboard.co.uk>
parents:
129
diff
changeset
|
55 Assert.AreNotEqual(obj, otherObj, "Objects equal for "+method.Name); |
081b48413f6d
Re #140: Add equality methods to WarFoundry objects
IBBoard <dev@ibboard.co.uk>
parents:
129
diff
changeset
|
56 Assert.AreNotEqual(otherObj, obj, "Objects equal for "+method.Name); |
081b48413f6d
Re #140: Add equality methods to WarFoundry objects
IBBoard <dev@ibboard.co.uk>
parents:
129
diff
changeset
|
57 } |
081b48413f6d
Re #140: Add equality methods to WarFoundry objects
IBBoard <dev@ibboard.co.uk>
parents:
129
diff
changeset
|
58 } |
081b48413f6d
Re #140: Add equality methods to WarFoundry objects
IBBoard <dev@ibboard.co.uk>
parents:
129
diff
changeset
|
59 } |
081b48413f6d
Re #140: Add equality methods to WarFoundry objects
IBBoard <dev@ibboard.co.uk>
parents:
129
diff
changeset
|
60 |
081b48413f6d
Re #140: Add equality methods to WarFoundry objects
IBBoard <dev@ibboard.co.uk>
parents:
129
diff
changeset
|
61 |
081b48413f6d
Re #140: Add equality methods to WarFoundry objects
IBBoard <dev@ibboard.co.uk>
parents:
129
diff
changeset
|
62 |
081b48413f6d
Re #140: Add equality methods to WarFoundry objects
IBBoard <dev@ibboard.co.uk>
parents:
129
diff
changeset
|
63 |
126
6571b6483d2d
* Set target framework to v2.0...AGAIN
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
64 [Test()] |
127 | 65 public void TestRaceWithNoUnitTypesHasNoRequirements() |
137
081b48413f6d
Re #140: Add equality methods to WarFoundry objects
IBBoard <dev@ibboard.co.uk>
parents:
129
diff
changeset
|
66 { |
127 | 67 Assert.That(new MockRace().GetRequirements(), Has.Count(0)); |
137
081b48413f6d
Re #140: Add equality methods to WarFoundry objects
IBBoard <dev@ibboard.co.uk>
parents:
129
diff
changeset
|
68 } |
081b48413f6d
Re #140: Add equality methods to WarFoundry objects
IBBoard <dev@ibboard.co.uk>
parents:
129
diff
changeset
|
69 |
081b48413f6d
Re #140: Add equality methods to WarFoundry objects
IBBoard <dev@ibboard.co.uk>
parents:
129
diff
changeset
|
70 [Test()] |
081b48413f6d
Re #140: Add equality methods to WarFoundry objects
IBBoard <dev@ibboard.co.uk>
parents:
129
diff
changeset
|
71 public void TestRaceWithOneUnitTypeHasNoRequirements() |
081b48413f6d
Re #140: Add equality methods to WarFoundry objects
IBBoard <dev@ibboard.co.uk>
parents:
129
diff
changeset
|
72 { |
081b48413f6d
Re #140: Add equality methods to WarFoundry objects
IBBoard <dev@ibboard.co.uk>
parents:
129
diff
changeset
|
73 MockRace race = new MockRace(); |
081b48413f6d
Re #140: Add equality methods to WarFoundry objects
IBBoard <dev@ibboard.co.uk>
parents:
129
diff
changeset
|
74 race.AddUnitType(new MockUnitType()); |
081b48413f6d
Re #140: Add equality methods to WarFoundry objects
IBBoard <dev@ibboard.co.uk>
parents:
129
diff
changeset
|
75 Assert.That(race.GetRequirements(), Has.Count(0)); |
081b48413f6d
Re #140: Add equality methods to WarFoundry objects
IBBoard <dev@ibboard.co.uk>
parents:
129
diff
changeset
|
76 } |
081b48413f6d
Re #140: Add equality methods to WarFoundry objects
IBBoard <dev@ibboard.co.uk>
parents:
129
diff
changeset
|
77 |
081b48413f6d
Re #140: Add equality methods to WarFoundry objects
IBBoard <dev@ibboard.co.uk>
parents:
129
diff
changeset
|
78 [Test()] |
081b48413f6d
Re #140: Add equality methods to WarFoundry objects
IBBoard <dev@ibboard.co.uk>
parents:
129
diff
changeset
|
79 public void TestRaceWithOneUnitTypeWithOneRequirementHasOneRequirement() |
081b48413f6d
Re #140: Add equality methods to WarFoundry objects
IBBoard <dev@ibboard.co.uk>
parents:
129
diff
changeset
|
80 { |
081b48413f6d
Re #140: Add equality methods to WarFoundry objects
IBBoard <dev@ibboard.co.uk>
parents:
129
diff
changeset
|
81 MockRace race = new MockRace(); |
081b48413f6d
Re #140: Add equality methods to WarFoundry objects
IBBoard <dev@ibboard.co.uk>
parents:
129
diff
changeset
|
82 MockUnitType unitType = new MockUnitType(); |
081b48413f6d
Re #140: Add equality methods to WarFoundry objects
IBBoard <dev@ibboard.co.uk>
parents:
129
diff
changeset
|
83 UnitRequiresAtLeastNUnitsRequirement unitRequirement = new UnitRequiresAtLeastNUnitsRequirement(unitType); |
081b48413f6d
Re #140: Add equality methods to WarFoundry objects
IBBoard <dev@ibboard.co.uk>
parents:
129
diff
changeset
|
84 unitType.AddRequirement(unitRequirement); |
081b48413f6d
Re #140: Add equality methods to WarFoundry objects
IBBoard <dev@ibboard.co.uk>
parents:
129
diff
changeset
|
85 race.AddUnitType(unitType); |
081b48413f6d
Re #140: Add equality methods to WarFoundry objects
IBBoard <dev@ibboard.co.uk>
parents:
129
diff
changeset
|
86 ICollection<IRequirement> raceRequirements = race.GetRequirements(); |
081b48413f6d
Re #140: Add equality methods to WarFoundry objects
IBBoard <dev@ibboard.co.uk>
parents:
129
diff
changeset
|
87 Assert.That(raceRequirements, Has.Count(1)); |
081b48413f6d
Re #140: Add equality methods to WarFoundry objects
IBBoard <dev@ibboard.co.uk>
parents:
129
diff
changeset
|
88 Assert.That(raceRequirements, Has.All.EqualTo(unitRequirement)); |
081b48413f6d
Re #140: Add equality methods to WarFoundry objects
IBBoard <dev@ibboard.co.uk>
parents:
129
diff
changeset
|
89 } |
081b48413f6d
Re #140: Add equality methods to WarFoundry objects
IBBoard <dev@ibboard.co.uk>
parents:
129
diff
changeset
|
90 |
081b48413f6d
Re #140: Add equality methods to WarFoundry objects
IBBoard <dev@ibboard.co.uk>
parents:
129
diff
changeset
|
91 [Test()] |
081b48413f6d
Re #140: Add equality methods to WarFoundry objects
IBBoard <dev@ibboard.co.uk>
parents:
129
diff
changeset
|
92 public void TestRaceWithTwoUnitTypesWithMultipleRequirementsHasMultipleRequirements() |
081b48413f6d
Re #140: Add equality methods to WarFoundry objects
IBBoard <dev@ibboard.co.uk>
parents:
129
diff
changeset
|
93 { |
081b48413f6d
Re #140: Add equality methods to WarFoundry objects
IBBoard <dev@ibboard.co.uk>
parents:
129
diff
changeset
|
94 MockRace race = new MockRace(); |
081b48413f6d
Re #140: Add equality methods to WarFoundry objects
IBBoard <dev@ibboard.co.uk>
parents:
129
diff
changeset
|
95 MockUnitType unitType1 = new MockUnitType("type1", "Type 1"); |
081b48413f6d
Re #140: Add equality methods to WarFoundry objects
IBBoard <dev@ibboard.co.uk>
parents:
129
diff
changeset
|
96 UnitRequiresAtLeastNUnitsRequirement unitRequirement1 = new UnitRequiresAtLeastNUnitsRequirement(unitType1); |
081b48413f6d
Re #140: Add equality methods to WarFoundry objects
IBBoard <dev@ibboard.co.uk>
parents:
129
diff
changeset
|
97 unitType1.AddRequirement(unitRequirement1); |
081b48413f6d
Re #140: Add equality methods to WarFoundry objects
IBBoard <dev@ibboard.co.uk>
parents:
129
diff
changeset
|
98 UnitRequiresNoMoreThanNOfUnitTypeRequirement unitRequirement2 = new UnitRequiresNoMoreThanNOfUnitTypeRequirement(unitType1); |
081b48413f6d
Re #140: Add equality methods to WarFoundry objects
IBBoard <dev@ibboard.co.uk>
parents:
129
diff
changeset
|
99 unitType1.AddRequirement(unitRequirement2); |
081b48413f6d
Re #140: Add equality methods to WarFoundry objects
IBBoard <dev@ibboard.co.uk>
parents:
129
diff
changeset
|
100 race.AddUnitType(unitType1); |
081b48413f6d
Re #140: Add equality methods to WarFoundry objects
IBBoard <dev@ibboard.co.uk>
parents:
129
diff
changeset
|
101 MockUnitType unitType2 = new MockUnitType("type2", "Type 2"); |
081b48413f6d
Re #140: Add equality methods to WarFoundry objects
IBBoard <dev@ibboard.co.uk>
parents:
129
diff
changeset
|
102 UnitRequiresAtLeastNUnitsRequirement unitRequirement3 = new UnitRequiresAtLeastNUnitsRequirement(unitType2); |
081b48413f6d
Re #140: Add equality methods to WarFoundry objects
IBBoard <dev@ibboard.co.uk>
parents:
129
diff
changeset
|
103 unitType2.AddRequirement(unitRequirement3); |
081b48413f6d
Re #140: Add equality methods to WarFoundry objects
IBBoard <dev@ibboard.co.uk>
parents:
129
diff
changeset
|
104 race.AddUnitType(unitType2); |
081b48413f6d
Re #140: Add equality methods to WarFoundry objects
IBBoard <dev@ibboard.co.uk>
parents:
129
diff
changeset
|
105 ICollection<IRequirement> raceRequirements = race.GetRequirements(); |
081b48413f6d
Re #140: Add equality methods to WarFoundry objects
IBBoard <dev@ibboard.co.uk>
parents:
129
diff
changeset
|
106 Assert.That(raceRequirements, Has.Count(3)); |
081b48413f6d
Re #140: Add equality methods to WarFoundry objects
IBBoard <dev@ibboard.co.uk>
parents:
129
diff
changeset
|
107 Assert.That(raceRequirements, Has.Member(unitRequirement1)); |
081b48413f6d
Re #140: Add equality methods to WarFoundry objects
IBBoard <dev@ibboard.co.uk>
parents:
129
diff
changeset
|
108 Assert.That(raceRequirements, Has.Member(unitRequirement2)); |
081b48413f6d
Re #140: Add equality methods to WarFoundry objects
IBBoard <dev@ibboard.co.uk>
parents:
129
diff
changeset
|
109 Assert.That(raceRequirements, Has.Member(unitRequirement3)); |
129 | 110 } |
111 | |
137
081b48413f6d
Re #140: Add equality methods to WarFoundry objects
IBBoard <dev@ibboard.co.uk>
parents:
129
diff
changeset
|
112 public override Race GetObject () |
129 | 113 { |
137
081b48413f6d
Re #140: Add equality methods to WarFoundry objects
IBBoard <dev@ibboard.co.uk>
parents:
129
diff
changeset
|
114 DummyWarFoundryFactory factory = new DummyWarFoundryFactory(); |
081b48413f6d
Re #140: Add equality methods to WarFoundry objects
IBBoard <dev@ibboard.co.uk>
parents:
129
diff
changeset
|
115 GameSystem gameSystem = new GameSystem("system", "system", factory); |
081b48413f6d
Re #140: Add equality methods to WarFoundry objects
IBBoard <dev@ibboard.co.uk>
parents:
129
diff
changeset
|
116 return new Race("race", "race", gameSystem, factory); |
129 | 117 } |
118 | |
137
081b48413f6d
Re #140: Add equality methods to WarFoundry objects
IBBoard <dev@ibboard.co.uk>
parents:
129
diff
changeset
|
119 public override Race GetSameObject () |
129 | 120 { |
137
081b48413f6d
Re #140: Add equality methods to WarFoundry objects
IBBoard <dev@ibboard.co.uk>
parents:
129
diff
changeset
|
121 DummyWarFoundryFactory factory = new DummyWarFoundryFactory(); |
081b48413f6d
Re #140: Add equality methods to WarFoundry objects
IBBoard <dev@ibboard.co.uk>
parents:
129
diff
changeset
|
122 GameSystem gameSystem = new GameSystem("system", "system", factory); |
081b48413f6d
Re #140: Add equality methods to WarFoundry objects
IBBoard <dev@ibboard.co.uk>
parents:
129
diff
changeset
|
123 return new Race("race", "race", gameSystem, factory); |
081b48413f6d
Re #140: Add equality methods to WarFoundry objects
IBBoard <dev@ibboard.co.uk>
parents:
129
diff
changeset
|
124 } |
081b48413f6d
Re #140: Add equality methods to WarFoundry objects
IBBoard <dev@ibboard.co.uk>
parents:
129
diff
changeset
|
125 |
081b48413f6d
Re #140: Add equality methods to WarFoundry objects
IBBoard <dev@ibboard.co.uk>
parents:
129
diff
changeset
|
126 public override Race GetDifferentObject () |
081b48413f6d
Re #140: Add equality methods to WarFoundry objects
IBBoard <dev@ibboard.co.uk>
parents:
129
diff
changeset
|
127 { |
081b48413f6d
Re #140: Add equality methods to WarFoundry objects
IBBoard <dev@ibboard.co.uk>
parents:
129
diff
changeset
|
128 DummyWarFoundryFactory factory = new DummyWarFoundryFactory(); |
081b48413f6d
Re #140: Add equality methods to WarFoundry objects
IBBoard <dev@ibboard.co.uk>
parents:
129
diff
changeset
|
129 GameSystem gameSystem = new GameSystem("system2", "another system", factory); |
081b48413f6d
Re #140: Add equality methods to WarFoundry objects
IBBoard <dev@ibboard.co.uk>
parents:
129
diff
changeset
|
130 return new Race("race2", "other race", gameSystem, factory); |
126
6571b6483d2d
* Set target framework to v2.0...AGAIN
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
131 } |
139 | 132 |
133 public Race GetOtherDifferentObjectWithSubID() | |
134 { | |
135 DummyWarFoundryFactory factory = new DummyWarFoundryFactory(); | |
136 GameSystem gameSystem = new GameSystem("system", "system", factory); | |
137 return new Race("race", "subid", "race", gameSystem, factory); | |
138 } | |
139 | |
140 public Race GetOtherDifferentObjectWithGameSystem() | |
141 { | |
142 DummyWarFoundryFactory factory = new DummyWarFoundryFactory(); | |
143 GameSystem gameSystem = new GameSystem("system2", "system", factory); | |
144 return new Race("race", "race", gameSystem, factory); | |
145 } | |
126
6571b6483d2d
* Set target framework to v2.0...AGAIN
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
146 } |
6571b6483d2d
* Set target framework to v2.0...AGAIN
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
147 } |
6571b6483d2d
* Set target framework to v2.0...AGAIN
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
148 |