comparison API/MockRequirementFactory.cs @ 157:17c5030485dc

Re #351: Add extensible requirement handling method * Swap to using IRequirement, as per interface * Test registration of factories
author IBBoard <dev@ibboard.co.uk>
date Sat, 23 Jul 2011 19:54:37 +0000
parents
children
comparison
equal deleted inserted replaced
156:ae2f1db8290c 157:17c5030485dc
1 // This file (MockRequirementFactory.cs) is a part of the IBBoard.WarFoundry.API.Tests project and is copyright 2011 IBBoard
2 //
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.
4 using System;
5 using IBBoard.WarFoundry.API.Factories.Requirement;
6 using IBBoard.WarFoundry.API.Factories.Requirement.Mock;
7 using IBBoard.WarFoundry.API.Objects.Requirement;
8
9 namespace IBBoard.WarFoundry.API
10 {
11 public class MockRequirementFactory : IRequirementFactory
12 {
13 private string factoryID;
14
15 public MockRequirementFactory(string factoryID)
16 {
17 this.factoryID = factoryID;
18 }
19
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)
21 {
22 throw new NotImplementedException ();
23 }
24
25 public string AppliesToID {
26 get {
27 return factoryID;
28 }
29 }
30 }
31 }
32