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
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
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
a2cbd7cb6a5e Re #24: Create limit objects
IBBoard <dev@ibboard.co.uk>
parents: 6
diff changeset
11 public class NumericSizeConstrainedLimitTest : AbstractLimitTest
a2cbd7cb6a5e Re #24: Create limit objects
IBBoard <dev@ibboard.co.uk>
parents: 6
diff changeset
12 {
a2cbd7cb6a5e Re #24: Create limit objects
IBBoard <dev@ibboard.co.uk>
parents: 6
diff changeset
13 public override AbstractLimit GetDefaultLimitObject ()
a2cbd7cb6a5e Re #24: Create limit objects
IBBoard <dev@ibboard.co.uk>
parents: 6
diff changeset
14 {
a2cbd7cb6a5e Re #24: Create limit objects
IBBoard <dev@ibboard.co.uk>
parents: 6
diff changeset
15 return new NumericSizeConstrainedLimit(10);
a2cbd7cb6a5e Re #24: Create limit objects
IBBoard <dev@ibboard.co.uk>
parents: 6
diff changeset
16 }
a2cbd7cb6a5e Re #24: Create limit objects
IBBoard <dev@ibboard.co.uk>
parents: 6
diff changeset
17
a2cbd7cb6a5e Re #24: Create limit objects
IBBoard <dev@ibboard.co.uk>
parents: 6
diff changeset
18 public override double GetSize100ExpectedValue ()
a2cbd7cb6a5e Re #24: Create limit objects
IBBoard <dev@ibboard.co.uk>
parents: 6
diff changeset
19 {
a2cbd7cb6a5e Re #24: Create limit objects
IBBoard <dev@ibboard.co.uk>
parents: 6
diff changeset
20 return 10;
a2cbd7cb6a5e Re #24: Create limit objects
IBBoard <dev@ibboard.co.uk>
parents: 6
diff changeset
21 }
a2cbd7cb6a5e Re #24: Create limit objects
IBBoard <dev@ibboard.co.uk>
parents: 6
diff changeset
22
a2cbd7cb6a5e Re #24: Create limit objects
IBBoard <dev@ibboard.co.uk>
parents: 6
diff changeset
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
a2cbd7cb6a5e Re #24: Create limit objects
IBBoard <dev@ibboard.co.uk>
parents: 6
diff changeset
25 return 10;
a2cbd7cb6a5e Re #24: Create limit objects
IBBoard <dev@ibboard.co.uk>
parents: 6
diff changeset
26 }
a2cbd7cb6a5e Re #24: Create limit objects
IBBoard <dev@ibboard.co.uk>
parents: 6
diff changeset
27
a2cbd7cb6a5e Re #24: Create limit objects
IBBoard <dev@ibboard.co.uk>
parents: 6
diff changeset
28 public override double GetSize1ExpectedValue ()
a2cbd7cb6a5e Re #24: Create limit objects
IBBoard <dev@ibboard.co.uk>
parents: 6
diff changeset
29 {
a2cbd7cb6a5e Re #24: Create limit objects
IBBoard <dev@ibboard.co.uk>
parents: 6
diff changeset
30 return 1;
a2cbd7cb6a5e Re #24: Create limit objects
IBBoard <dev@ibboard.co.uk>
parents: 6
diff changeset
31 }
a2cbd7cb6a5e Re #24: Create limit objects
IBBoard <dev@ibboard.co.uk>
parents: 6
diff changeset
32
a2cbd7cb6a5e Re #24: Create limit objects
IBBoard <dev@ibboard.co.uk>
parents: 6
diff changeset
33 public override AbstractLimit GetEqualLimitObject ()
a2cbd7cb6a5e Re #24: Create limit objects
IBBoard <dev@ibboard.co.uk>
parents: 6
diff changeset
34 {
a2cbd7cb6a5e Re #24: Create limit objects
IBBoard <dev@ibboard.co.uk>
parents: 6
diff changeset
35 return new NumericSizeConstrainedLimit(10);
a2cbd7cb6a5e Re #24: Create limit objects
IBBoard <dev@ibboard.co.uk>
parents: 6
diff changeset
36 }
a2cbd7cb6a5e Re #24: Create limit objects
IBBoard <dev@ibboard.co.uk>
parents: 6
diff changeset
37
a2cbd7cb6a5e Re #24: Create limit objects
IBBoard <dev@ibboard.co.uk>
parents: 6
diff changeset
38 public override AbstractLimit GetUnequalLimitObject ()
a2cbd7cb6a5e Re #24: Create limit objects
IBBoard <dev@ibboard.co.uk>
parents: 6
diff changeset
39 {
a2cbd7cb6a5e Re #24: Create limit objects
IBBoard <dev@ibboard.co.uk>
parents: 6
diff changeset
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 }