Mercurial > repos > IBBoard.Tests
annotate Limits/CompositeMinimumLimitTest.cs @ 28:31fdc90f3556
* Fix license comments at top of files
no-open-ticket
author | IBBoard <dev@ibboard.co.uk> |
---|---|
date | Sat, 21 Aug 2010 10:07:09 +0000 |
parents | 57b5d27e95fb |
children |
rev | line source |
---|---|
26 | 1 // This file (CompositeMinimumLimitTest.cs) is a part of the IBBoard.Tests project and is copyright 2010 IBBoard |
2 // | |
28
31fdc90f3556
* Fix license comments at top of files
IBBoard <dev@ibboard.co.uk>
parents:
26
diff
changeset
|
3 // The file and the library/program it is in are licensed and distributed, without warranty, under the GNU LGPL, either version 3 of the License or (at your option) any later version. Please see COPYING for more information and the full license. |
26 | 4 using System; |
5 using System.Collections.Generic; | |
6 using NUnit.Framework; | |
7 namespace IBBoard.Limits | |
8 { | |
9 [TestFixture()] | |
10 public class CompositeMinimumLimitTest : AbstractCompositeLimitTest | |
11 { | |
12 protected override AbstractCompositeLimit CreateCompositeLimitWithLimit (ILimit limit) | |
13 { | |
14 return new CompositeMinimumLimit(limit); | |
15 } | |
16 | |
17 | |
18 protected override AbstractCompositeLimit CreateCompositeLimitWithCollection (List<ILimit> limits) | |
19 { | |
20 return new CompositeMinimumLimit(limits); | |
21 } | |
22 | |
23 | |
24 protected override int GetMultipleLimitValue(int numberBeingLimited, int sizeConstrainedLimitNum, int absoluteLimitNum) | |
25 { | |
26 int limitedNum = Math.Min(sizeConstrainedLimitNum, numberBeingLimited); | |
27 limitedNum = Math.Min(limitedNum, absoluteLimitNum); | |
28 return limitedNum; | |
29 } | |
30 } | |
31 } | |
32 |