diff options
| author | mo khan <mo@mokhan.ca> | 2007-08-26 20:10:42 -0600 |
|---|---|---|
| committer | mo khan <mo@mokhan.ca> | 2007-08-26 20:10:42 -0600 |
| commit | 330be9feefb6394479553be0e078b4c4df3cbff1 (patch) | |
| tree | 55618c8af0d36583cde0ea5b4b193b98815a35aa /src/app/Cmpp298.Assignment3.Domain/AmountEntrySpecification.cs | |
import from svntrunk
Diffstat (limited to 'src/app/Cmpp298.Assignment3.Domain/AmountEntrySpecification.cs')
| -rw-r--r-- | src/app/Cmpp298.Assignment3.Domain/AmountEntrySpecification.cs | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/app/Cmpp298.Assignment3.Domain/AmountEntrySpecification.cs b/src/app/Cmpp298.Assignment3.Domain/AmountEntrySpecification.cs new file mode 100644 index 0000000..d7bfe18 --- /dev/null +++ b/src/app/Cmpp298.Assignment3.Domain/AmountEntrySpecification.cs @@ -0,0 +1,9 @@ +using System.Text.RegularExpressions;
+
+namespace Cmpp298.Assignment3.Domain {
+ public class AmountEntrySpecification : ISpecification< string > {
+ public bool IsSatisfiedBy( string input ) {
+ return Regex.IsMatch( input, @"(^\d*\.?\d*[0-9]+\d*$)|(^[0-9]+\d*\.\d*$)" );
+ }
+ }
+}
\ No newline at end of file |
