comparison Library/LibrarySystem.Tests/Core/StockTests.cs @ 43:aef06698d9e2 Test

Added the library tests
author Steven Hollidge <stevenhollidge@hotmail.com>
date Wed, 04 Apr 2012 19:20:20 +0100
parents
children
comparison
equal deleted inserted replaced
42:0d4aff4f699d 43:aef06698d9e2
1 using System;
2 using LibrarySystem.Core;
3 using NUnit.Framework;
4
5 namespace LibrarySystem.Tests.Core
6 {
7 [TestFixture]
8 class StockTests
9 {
10 [Test]
11 public void Create_WithValidName_ShouldReturnPublisher()
12 {
13 var publisher = Publisher.Create("dummy");
14 var publication = Publication.Create("dummy","dummy", publisher, "dummy");
15 var book = Book.Create("dummy", publication);
16 var stock = Stock.Create(book, true);
17 Assert.IsNotNull(stock);
18 }
19
20 [Test]
21 public void Create_WithNullBook_ShouldThrowAgrumentNullException()
22 {
23 Assert.Throws<ArgumentNullException>(() => Stock.Create(null, true));
24 }
25 }
26 }