Mercurial > silverbladetech
comparison SilverlightValidation/SilverlightValidation.Tests/Data/FactoryFixture.cs @ 109:11994ccdc50b
First wave of tests complete
author | stevenhollidge <stevenhollidge@hotmail.com> |
---|---|
date | Sun, 06 May 2012 20:37:32 +0100 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
108:b728c44d9c61 | 109:11994ccdc50b |
---|---|
1 using Microsoft.VisualStudio.TestTools.UnitTesting; | |
2 using SilverlightValidation.Data; | |
3 using FluentAssertions; | |
4 | |
5 namespace SilverlightValidation.Tests.Data | |
6 { | |
7 [TestClass] | |
8 public class FactoryFixture | |
9 { | |
10 [TestMethod] | |
11 public void WhenCreateUserModels_ThenFiveModelsWithUsernameAndPasswordAndEmailSet() | |
12 { | |
13 const int expectedCount = 5; | |
14 var userModels = Factory.CreateUserModels(); | |
15 | |
16 foreach (var userModel in userModels) | |
17 { | |
18 userModel.Username.Should().NotBeNullOrEmpty(); | |
19 userModel.Password.Should().NotBeNullOrEmpty(); | |
20 userModel.Email.Should().NotBeNullOrEmpty(); | |
21 userModel.DateOfBirth.Should().HaveValue(); | |
22 } | |
23 | |
24 userModels.Should().HaveCount(expectedCount); | |
25 } | |
26 | |
27 } | |
28 } |