annotate Library/LibrarySystem.Tests/Core/PublisherTests.cs @ 121:8f94475d3146 tip

final code
author stevenh7776
date Thu, 31 May 2012 15:35:26 +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 PublisherTests
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_WithValidName_ShouldReturnPublisher()
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 publisher = Publisher.Create("dummy");
aef06698d9e2 Added the library tests
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
14 Assert.IsNotNull(publisher);
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_WithNullName_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>(() => Publisher.Create(null));
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 }