Mercurial > repos > IBBoard.Tests
annotate Limits/NumericSizeConstrainedLimitTest.cs @ 7:a2cbd7cb6a5e
Re #24: Create limit objects
* Extract out common tests
* Make old tests use new abstract
* Add tests for new class
author | IBBoard <dev@ibboard.co.uk> |
---|---|
date | Tue, 20 Oct 2009 19:49:44 +0000 |
parents | 9a860452ced0 |
children | 5507654d189d |
rev | line source |
---|---|
6
9a860452ced0
Re #24: Add "limit" objects that can be used for numeric limits
IBBoard <dev@ibboard.co.uk>
parents:
4
diff
changeset
|
1 // This file (NumericSizeConstrainedLimitTest.cs) is a part of the IBBoard.Tests project and is copyright 2009 IBBoard |
4
a6b26fe532df
Re #24: Add "limit" objects that can be used for numeric limits
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
2 // |
6
9a860452ced0
Re #24: Add "limit" objects that can be used for numeric limits
IBBoard <dev@ibboard.co.uk>
parents:
4
diff
changeset
|
3 // The file and the library/program it is in are licensed under the GNU LGPL license, either version 3 of the License or (at your option) any later version. Please see COPYING.LGPL for more information and the full license. |
4
a6b26fe532df
Re #24: Add "limit" objects that can be used for numeric limits
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
4 |
a6b26fe532df
Re #24: Add "limit" objects that can be used for numeric limits
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
5 using System; |
a6b26fe532df
Re #24: Add "limit" objects that can be used for numeric limits
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
6 using NUnit.Framework; |
a6b26fe532df
Re #24: Add "limit" objects that can be used for numeric limits
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
7 |
a6b26fe532df
Re #24: Add "limit" objects that can be used for numeric limits
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
8 namespace IBBoard.Limits |
a6b26fe532df
Re #24: Add "limit" objects that can be used for numeric limits
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
9 { |
a6b26fe532df
Re #24: Add "limit" objects that can be used for numeric limits
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
10 [TestFixture()] |
7 | 11 public class NumericSizeConstrainedLimitTest : AbstractLimitTest |
12 { | |
13 public override AbstractLimit GetDefaultLimitObject () | |
14 { | |
15 return new NumericSizeConstrainedLimit(10); | |
16 } | |
17 | |
18 public override double GetSize100ExpectedValue () | |
19 { | |
20 return 10; | |
21 } | |
22 | |
23 public override double GetSize10ExpectedValue () | |
4
a6b26fe532df
Re #24: Add "limit" objects that can be used for numeric limits
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
24 { |
7 | 25 return 10; |
26 } | |
27 | |
28 public override double GetSize1ExpectedValue () | |
29 { | |
30 return 1; | |
31 } | |
32 | |
33 public override AbstractLimit GetEqualLimitObject () | |
34 { | |
35 return new NumericSizeConstrainedLimit(10); | |
36 } | |
37 | |
38 public override AbstractLimit GetUnequalLimitObject () | |
39 { | |
40 return new NumericSizeConstrainedLimit(100); | |
4
a6b26fe532df
Re #24: Add "limit" objects that can be used for numeric limits
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
41 } |
a6b26fe532df
Re #24: Add "limit" objects that can be used for numeric limits
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
42 } |
a6b26fe532df
Re #24: Add "limit" objects that can be used for numeric limits
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
43 } |