Mercurial > repos > IBDev-IBBoard.WarFoundry.API.Tests
annotate API/MockRequirementFactory.cs @ 210:649759343da5
Re #379: Fix validation of requirements to check for unit
* Tidy up tests to reduce replication and fix copy-and-paste inconsistencies
author | IBBoard <dev@ibboard.co.uk> |
---|---|
date | Sat, 25 Feb 2012 16:36:20 +0000 |
parents | 17c5030485dc |
children |
rev | line source |
---|---|
157
17c5030485dc
Re #351: Add extensible requirement handling method
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
1 // This file (MockRequirementFactory.cs) is a part of the IBBoard.WarFoundry.API.Tests project and is copyright 2011 IBBoard |
17c5030485dc
Re #351: Add extensible requirement handling method
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
2 // |
17c5030485dc
Re #351: Add extensible requirement handling method
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. |
17c5030485dc
Re #351: Add extensible requirement handling method
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
4 using System; |
17c5030485dc
Re #351: Add extensible requirement handling method
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
5 using IBBoard.WarFoundry.API.Factories.Requirement; |
17c5030485dc
Re #351: Add extensible requirement handling method
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
6 using IBBoard.WarFoundry.API.Factories.Requirement.Mock; |
17c5030485dc
Re #351: Add extensible requirement handling method
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
7 using IBBoard.WarFoundry.API.Objects.Requirement; |
17c5030485dc
Re #351: Add extensible requirement handling method
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
8 |
17c5030485dc
Re #351: Add extensible requirement handling method
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
9 namespace IBBoard.WarFoundry.API |
17c5030485dc
Re #351: Add extensible requirement handling method
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
10 { |
17c5030485dc
Re #351: Add extensible requirement handling method
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
11 public class MockRequirementFactory : IRequirementFactory |
17c5030485dc
Re #351: Add extensible requirement handling method
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
12 { |
17c5030485dc
Re #351: Add extensible requirement handling method
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
13 private string factoryID; |
17c5030485dc
Re #351: Add extensible requirement handling method
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
14 |
17c5030485dc
Re #351: Add extensible requirement handling method
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
15 public MockRequirementFactory(string factoryID) |
17c5030485dc
Re #351: Add extensible requirement handling method
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
16 { |
17c5030485dc
Re #351: Add extensible requirement handling method
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
17 this.factoryID = factoryID; |
17c5030485dc
Re #351: Add extensible requirement handling method
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
18 } |
17c5030485dc
Re #351: Add extensible requirement handling method
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
19 |
17c5030485dc
Re #351: Add extensible requirement handling method
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
20 public IRequirement CreateRequirement<SOURCE_FILE_TYPE, ENTRY_TYPE> (IBBoard.WarFoundry.API.Objects.UnitType type, string data, IBBoard.WarFoundry.API.Factories.IRaceFactory<SOURCE_FILE_TYPE, ENTRY_TYPE> raceFactory) |
17c5030485dc
Re #351: Add extensible requirement handling method
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
21 { |
17c5030485dc
Re #351: Add extensible requirement handling method
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
22 throw new NotImplementedException (); |
17c5030485dc
Re #351: Add extensible requirement handling method
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
23 } |
17c5030485dc
Re #351: Add extensible requirement handling method
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
24 |
17c5030485dc
Re #351: Add extensible requirement handling method
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
25 public string AppliesToID { |
17c5030485dc
Re #351: Add extensible requirement handling method
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
26 get { |
17c5030485dc
Re #351: Add extensible requirement handling method
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
27 return factoryID; |
17c5030485dc
Re #351: Add extensible requirement handling method
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
28 } |
17c5030485dc
Re #351: Add extensible requirement handling method
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
29 } |
17c5030485dc
Re #351: Add extensible requirement handling method
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
30 } |
17c5030485dc
Re #351: Add extensible requirement handling method
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
31 } |
17c5030485dc
Re #351: Add extensible requirement handling method
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
32 |