Mercurial > silverbladetech
view 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 |
line wrap: on
line source
using Microsoft.VisualStudio.TestTools.UnitTesting; using SilverlightValidation.Data; using FluentAssertions; namespace SilverlightValidation.Tests.Data { [TestClass] public class FactoryFixture { [TestMethod] public void WhenCreateUserModels_ThenFiveModelsWithUsernameAndPasswordAndEmailSet() { const int expectedCount = 5; var userModels = Factory.CreateUserModels(); foreach (var userModel in userModels) { userModel.Username.Should().NotBeNullOrEmpty(); userModel.Password.Should().NotBeNullOrEmpty(); userModel.Email.Should().NotBeNullOrEmpty(); userModel.DateOfBirth.Should().HaveValue(); } userModels.Should().HaveCount(expectedCount); } } }