diff SilverlightValidation/SilverlightValidation.Tests/Helpers/Helper.cs @ 109:11994ccdc50b

First wave of tests complete
author stevenhollidge <stevenhollidge@hotmail.com>
date Sun, 06 May 2012 20:37:32 +0100
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/SilverlightValidation/SilverlightValidation.Tests/Helpers/Helper.cs	Sun May 06 20:37:32 2012 +0100
@@ -0,0 +1,32 @@
+using System;
+using FluentAssertions.EventMonitoring;
+using SilverlightValidation.Models;
+using SilverlightValidation.Tests.Fakes;
+using SilverlightValidation.ViewModels;
+
+namespace SilverlightValidation.Tests.Helpers
+{
+    public class Helper
+    {
+        public static UserViewModel CreateDefaultUserViewModel()
+        {
+            var vm = new UserViewModel(UserModel.Create(), UserModelValidatorFake.Create());
+            vm.MonitorEvents();
+            return vm;
+        }
+
+        public static UserViewModel CreateInvalidUserViewModel()
+        {
+            var vm = new UserViewModel(UserModel.Create(), UserModelValidatorFake.Create());
+            vm.MonitorEvents();
+            return vm;
+        }
+
+        public static UserViewModel CreateValidUserViewModel()
+        {
+            var vm = new UserViewModel(UserModel.Create("dummy", "Dummy1", "dummy@dummy.com", new DateTime(1977, 01, 01)), UserModelValidatorFake.Create());
+            vm.MonitorEvents();
+            return vm;
+        }
+    }
+}