# HG changeset patch # User IBBoard # Date 1254855187 0 # Node ID a6b26fe532dffece8fb40e0e89cdec36735a4461 # Parent 8c45831988c35ffaf9cb4ce9c48205d0e1781953 Re #24: Add "limit" objects that can be used for numeric limits * Add initial tests diff -r 8c45831988c3 -r a6b26fe532df IBBoard.Tests.csproj --- a/IBBoard.Tests.csproj Tue Oct 06 18:37:31 2009 +0000 +++ b/IBBoard.Tests.csproj Tue Oct 06 18:53:07 2009 +0000 @@ -7,7 +7,7 @@ 2.0 {4160F7B6-4CFA-41FC-B5D7-5C9AE06FEBA7} Library - IBBoard.Tests2 + IBBoard true @@ -17,6 +17,7 @@ DEBUG prompt 4 + IBBoard.Tests none @@ -24,9 +25,11 @@ bin\Release prompt 4 + IBBoard.Tests2 + @@ -36,6 +39,7 @@ + @@ -43,4 +47,13 @@ IBBoard + + + + + + + + + \ No newline at end of file diff -r 8c45831988c3 -r a6b26fe532df Limits/NumericSizeConstrainedLimitTest.cs --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Limits/NumericSizeConstrainedLimitTest.cs Tue Oct 06 18:53:07 2009 +0000 @@ -0,0 +1,22 @@ +// This file (NumericSizeConstrainedLimitTest.cs) is a part of the IBBoard.Tests project and is copyright 2009 IBBoard +// +// 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 NUnit.Framework; + +namespace IBBoard.Limits +{ + [TestFixture()] + public class NumericSizeConstrainedLimitTest + { + [Test()] + public void TestSizeConstrainedLimits() + { + NumericSizeConstrainedLimit limit = new NumericSizeConstrainedLimit(10); + Assert.AreEqual(10, limit.GetLimit(100)); + Assert.AreEqual(10, limit.GetLimit(10)); + Assert.AreEqual(1, limit.GetLimit(1)); + } + } +} diff -r 8c45831988c3 -r a6b26fe532df Limits/RoundedPercentageLimitTest.cs --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Limits/RoundedPercentageLimitTest.cs Tue Oct 06 18:53:07 2009 +0000 @@ -0,0 +1,18 @@ +// This file (RoundedPercentageLimitTest.cs) is a part of the IBBoard.Tests project and is copyright 2009 IBBoard +// +// 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 NUnit.Framework; + +namespace IBBoard.Limits +{ + [TestFixture()] + public class RoundedPercentageLimitTest + { + [Test()] + public void TestCase () + { + } + } +}