Mercurial > repos > IBBoard.WarFoundry.API.Tests
comparison API/Objects/Requirement/Mock/AbstractFixedRequirement.cs @ 133:f64742dde5f9
Re #27: Unit requirements
* Start writing tests for requirement handler
* Add mocks to support tests
Note: NA test currently fails (expect pass but get fail)
author | IBBoard <dev@ibboard.co.uk> |
---|---|
date | Sun, 17 Apr 2011 20:07:57 +0000 |
parents | |
children | cd95fc6400b2 |
comparison
equal
deleted
inserted
replaced
132:8f1af48e120c | 133:f64742dde5f9 |
---|---|
1 // This file (AbstractFixedRequirement.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 | |
6 namespace IBBoard.WarFoundry.API.Objects.Requirement.Mock | |
7 { | |
8 public class AbstractFixedRequirement : IRequirement | |
9 { | |
10 private Validation result; | |
11 | |
12 public AbstractFixedRequirement(Validation fixedResult) | |
13 { | |
14 result = fixedResult; | |
15 } | |
16 | |
17 public Validation AllowsAdding (WarFoundryObject wfObject, Army toArmy) | |
18 { | |
19 return result; | |
20 } | |
21 | |
22 public Validation ValidatesArmy (Army army) | |
23 { | |
24 return result; | |
25 } | |
26 } | |
27 } | |
28 |