diff SilverlightValidation/SilverlightValidation.PL/Models/UserModel.cs @ 102:db05a55e3536

INPC tests added
author stevenhollidge <stevenhollidge@hotmail.com>
date Sun, 06 May 2012 12:13:29 +0100
parents d0c2cac12376
children 11994ccdc50b
line wrap: on
line diff
--- a/SilverlightValidation/SilverlightValidation.PL/Models/UserModel.cs	Sat May 05 23:04:42 2012 +0100
+++ b/SilverlightValidation/SilverlightValidation.PL/Models/UserModel.cs	Sun May 06 12:13:29 2012 +0100
@@ -1,5 +1,4 @@
 using System;
-using System.ComponentModel;
 using SilverlightValidation.Interfaces;
 
 namespace SilverlightValidation.Models
@@ -7,19 +6,32 @@
     public class UserModel : IUserModel
     {
         public string Username { get; set; }
+        public string Password { get; set; }
         public string Email { get; set; }
-        public string Password { get; set; }
         public DateTime? DateOfBirth { get; set; }
         public string Description { get; set; }
 
-        public static UserModel Create()
+        private UserModel() { }
+
+        public static UserModel Create(string username = "",
+                                        string password = "",
+                                        string email = "",
+                                        DateTime? dateOfBirth = null,
+                                        string descripton = "")
         {
-            return new UserModel() { Username = "", Email = "", Password = "", DateOfBirth = null, Description = "" };
+            return new UserModel()
+                       {
+                           Username = "",
+                           Password = "",
+                           Email = "",
+                           DateOfBirth = null,
+                           Description = ""
+                       };
         }
 
         public IUserModel Clone()
         {
-            return (UserModel) this.MemberwiseClone(); 
+            return (UserModel)this.MemberwiseClone();
         }
     }
 }