annotate Library/LibrarySystem/Core/Publisher.cs @ 43:aef06698d9e2 Test

Added the library tests
author Steven Hollidge <stevenhollidge@hotmail.com>
date Wed, 04 Apr 2012 19:20:20 +0100
parents dbd242eb9c33
children
rev   line source
43
aef06698d9e2 Added the library tests
Steven Hollidge <stevenhollidge@hotmail.com>
parents: 41
diff changeset
1 using System;
aef06698d9e2 Added the library tests
Steven Hollidge <stevenhollidge@hotmail.com>
parents: 41
diff changeset
2 using LibrarySystem.Interfaces;
41
dbd242eb9c33 Initial wave of TDD development
adminsh@apollo
parents:
diff changeset
3
dbd242eb9c33 Initial wave of TDD development
adminsh@apollo
parents:
diff changeset
4 namespace LibrarySystem.Core
dbd242eb9c33 Initial wave of TDD development
adminsh@apollo
parents:
diff changeset
5 {
dbd242eb9c33 Initial wave of TDD development
adminsh@apollo
parents:
diff changeset
6 public class Publisher : IPublisher
dbd242eb9c33 Initial wave of TDD development
adminsh@apollo
parents:
diff changeset
7 {
43
aef06698d9e2 Added the library tests
Steven Hollidge <stevenhollidge@hotmail.com>
parents: 41
diff changeset
8 public string Name { get; private set; }
aef06698d9e2 Added the library tests
Steven Hollidge <stevenhollidge@hotmail.com>
parents: 41
diff changeset
9
aef06698d9e2 Added the library tests
Steven Hollidge <stevenhollidge@hotmail.com>
parents: 41
diff changeset
10 private Publisher()
aef06698d9e2 Added the library tests
Steven Hollidge <stevenhollidge@hotmail.com>
parents: 41
diff changeset
11 {
aef06698d9e2 Added the library tests
Steven Hollidge <stevenhollidge@hotmail.com>
parents: 41
diff changeset
12
aef06698d9e2 Added the library tests
Steven Hollidge <stevenhollidge@hotmail.com>
parents: 41
diff changeset
13 }
aef06698d9e2 Added the library tests
Steven Hollidge <stevenhollidge@hotmail.com>
parents: 41
diff changeset
14
aef06698d9e2 Added the library tests
Steven Hollidge <stevenhollidge@hotmail.com>
parents: 41
diff changeset
15 public static IPublisher Create(string name)
aef06698d9e2 Added the library tests
Steven Hollidge <stevenhollidge@hotmail.com>
parents: 41
diff changeset
16 {
aef06698d9e2 Added the library tests
Steven Hollidge <stevenhollidge@hotmail.com>
parents: 41
diff changeset
17 if (name == null)
aef06698d9e2 Added the library tests
Steven Hollidge <stevenhollidge@hotmail.com>
parents: 41
diff changeset
18 throw new ArgumentNullException();
aef06698d9e2 Added the library tests
Steven Hollidge <stevenhollidge@hotmail.com>
parents: 41
diff changeset
19
aef06698d9e2 Added the library tests
Steven Hollidge <stevenhollidge@hotmail.com>
parents: 41
diff changeset
20 return new Publisher() { Name = name };
aef06698d9e2 Added the library tests
Steven Hollidge <stevenhollidge@hotmail.com>
parents: 41
diff changeset
21 }
41
dbd242eb9c33 Initial wave of TDD development
adminsh@apollo
parents:
diff changeset
22 }
dbd242eb9c33 Initial wave of TDD development
adminsh@apollo
parents:
diff changeset
23 }