diff Limits/NumericSizeConstrainedLimitTest.cs @ 10:5507654d189d

Re #24: Add limit objects * Test both constructors for constrained limits
author IBBoard <dev@ibboard.co.uk>
date Sat, 24 Oct 2009 19:50:09 +0000
parents a2cbd7cb6a5e
children
line wrap: on
line diff
--- a/Limits/NumericSizeConstrainedLimitTest.cs	Fri Oct 23 19:05:43 2009 +0000
+++ b/Limits/NumericSizeConstrainedLimitTest.cs	Sat Oct 24 19:50:09 2009 +0000
@@ -12,12 +12,21 @@
 	{		
 		public override AbstractLimit GetDefaultLimitObject ()
 		{
-			return new NumericSizeConstrainedLimit(10);
+			return new NumericSizeConstrainedLimit();
+		}
+		
+		[Test()]
+		public void TestLimitedConstraint ()
+		{
+			NumericSizeConstrainedLimit limit = new NumericSizeConstrainedLimit(10);
+			Assert.AreEqual(10, limit.GetLimit(100));
+			Assert.AreEqual(10, limit.GetLimit(10));
+			Assert.AreEqual(1, limit.GetLimit(1));
 		}
 		
 		public override double GetSize100ExpectedValue ()
 		{
-			return 10;
+			return 100;
 		}
 		
 		public override double GetSize10ExpectedValue ()
@@ -32,12 +41,12 @@
 		
 		public override AbstractLimit GetEqualLimitObject ()
 		{
-			return new NumericSizeConstrainedLimit(10);
+			return new NumericSizeConstrainedLimit();
 		}
 		
 		public override AbstractLimit GetUnequalLimitObject ()
 		{
-			return new NumericSizeConstrainedLimit(100);
+			return new NumericSizeConstrainedLimit(10);
 		}
 	}
 }