Mercurial > silverbladetech
annotate Library/LibrarySystem.Tests/Core/PersonTests.cs @ 85:4863009a2edf
renamed bugs to todo
author | Steven Hollidge <stevenhollidge@hotmail.com> |
---|---|
date | Tue, 24 Apr 2012 00:52:39 +0100 |
parents | aef06698d9e2 |
children |
rev | line source |
---|---|
43
aef06698d9e2
Added the library tests
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
1 using System; |
aef06698d9e2
Added the library tests
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
2 using LibrarySystem.Core; |
aef06698d9e2
Added the library tests
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
3 using NUnit.Framework; |
aef06698d9e2
Added the library tests
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
4 |
aef06698d9e2
Added the library tests
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
5 namespace LibrarySystem.Tests.Core |
aef06698d9e2
Added the library tests
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
6 { |
aef06698d9e2
Added the library tests
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
7 [TestFixture] |
aef06698d9e2
Added the library tests
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
8 class PersonTests |
aef06698d9e2
Added the library tests
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
9 { |
aef06698d9e2
Added the library tests
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
10 [Test] |
aef06698d9e2
Added the library tests
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
11 public void Create_WithValidParams_ShouldReturnPerson() |
aef06698d9e2
Added the library tests
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
12 { |
aef06698d9e2
Added the library tests
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
13 var person = Person.Create("dummy", "dummy"); |
aef06698d9e2
Added the library tests
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
14 Assert.IsNotNull(person); |
aef06698d9e2
Added the library tests
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
15 } |
aef06698d9e2
Added the library tests
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
16 |
aef06698d9e2
Added the library tests
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
17 [Test] |
aef06698d9e2
Added the library tests
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
18 public void Create_WithNullAddress_ShouldThrowAgrumentNullException() |
aef06698d9e2
Added the library tests
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
19 { |
aef06698d9e2
Added the library tests
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
20 Assert.Throws<ArgumentNullException>(() => Person.Create(null, "dummy")); |
aef06698d9e2
Added the library tests
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
21 } |
aef06698d9e2
Added the library tests
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
22 |
aef06698d9e2
Added the library tests
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
23 [Test] |
aef06698d9e2
Added the library tests
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
24 public void Create_WithNullName_ShouldThrowAgrumentNullException() |
aef06698d9e2
Added the library tests
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
25 { |
aef06698d9e2
Added the library tests
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
26 Assert.Throws<ArgumentNullException>(() => Person.Create("dummy", null)); |
aef06698d9e2
Added the library tests
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
27 } |
aef06698d9e2
Added the library tests
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
28 |
aef06698d9e2
Added the library tests
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
29 [Test] |
aef06698d9e2
Added the library tests
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
30 public void Create_WithNullAddressAndName_ShouldThrowAgrumentNullException() |
aef06698d9e2
Added the library tests
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
31 { |
aef06698d9e2
Added the library tests
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
32 Assert.Throws<ArgumentNullException>(() => Person.Create(null, null)); |
aef06698d9e2
Added the library tests
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
33 } |
aef06698d9e2
Added the library tests
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
34 } |
aef06698d9e2
Added the library tests
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
35 } |