Mercurial > repos > IBDev-IBBoard.WarFoundry.API.Tests
diff API/Objects/Mock/MockNumericAmountUnitEquipmentItem.cs @ 19:9b23e72ba3cf
Re #198: Add equipment slots
* Fix unit tests
author | IBBoard <dev@ibboard.co.uk> |
---|---|
date | Tue, 27 Oct 2009 20:00:54 +0000 |
parents | 1119b6f48e8e |
children | d48e73488838 |
line wrap: on
line diff
--- a/API/Objects/Mock/MockNumericAmountUnitEquipmentItem.cs Sat Oct 24 18:59:30 2009 +0000 +++ b/API/Objects/Mock/MockNumericAmountUnitEquipmentItem.cs Tue Oct 27 20:00:54 2009 +0000 @@ -3,16 +3,21 @@ // 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. using System; +using IBBoard.Limits; namespace IBBoard.WarFoundry.API.Objects.Mock { public class MockNumericAmountUnitEquipmentItem : UnitEquipmentItem { - - public MockNumericAmountUnitEquipmentItem () : base(new MockEquipmentItem(), new MockUnitType()) + + public MockNumericAmountUnitEquipmentItem () : this(5) { - MaxPercentage = 100; //TODO: This seems odd - maybe IsRatio should be "!=0" - MaxNumber = WarFoundryCore.INFINITY; + } + + + public MockNumericAmountUnitEquipmentItem (int limit) : base(new MockEquipmentItem(), new MockUnitType()) + { + MaxLimit = new NumericSizeConstrainedLimit(limit); } } }