annotate API/AbstractWarFoundryLoaderTests.cs @ 184:00ea622313be

Re #366: Rewrite equipment handling and limits * Add test for numeric amounts to make sure that they're not affected either
author IBBoard <dev@ibboard.co.uk>
date Sat, 12 Nov 2011 20:49:11 +0000
parents 4211c818ef96
children 7c21ca1482cb
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
77
4211c818ef96 Fixes #238: subfolders datafolder
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
1 using System;
4211c818ef96 Fixes #238: subfolders datafolder
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
2 using NUnit.Framework;
4211c818ef96 Fixes #238: subfolders datafolder
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
3 using IBBoard.WarFoundry.MockObjects;
4211c818ef96 Fixes #238: subfolders datafolder
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
4 using System.Collections.Generic;
4211c818ef96 Fixes #238: subfolders datafolder
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
5 using NUnit.Framework.SyntaxHelpers;
4211c818ef96 Fixes #238: subfolders datafolder
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
6 using System.IO;
4211c818ef96 Fixes #238: subfolders datafolder
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
7
4211c818ef96 Fixes #238: subfolders datafolder
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
8 namespace IBBoard.WarFoundry.API
4211c818ef96 Fixes #238: subfolders datafolder
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
9 {
4211c818ef96 Fixes #238: subfolders datafolder
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
10 [TestFixture()]
4211c818ef96 Fixes #238: subfolders datafolder
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
11 public class AbstractWarFoundryLoaderTests
4211c818ef96 Fixes #238: subfolders datafolder
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
12 {
4211c818ef96 Fixes #238: subfolders datafolder
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
13 [Test()]
4211c818ef96 Fixes #238: subfolders datafolder
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
14 public void TestTriesToLoadFromSubdir()
4211c818ef96 Fixes #238: subfolders datafolder
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
15 {
4211c818ef96 Fixes #238: subfolders datafolder
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
16 MockWarFoundryLoader loader = new MockWarFoundryLoader();
4211c818ef96 Fixes #238: subfolders datafolder
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
17 loader.AddLoadDirectory(new DirectoryInfo("testdata/subdir-loading-test"));
4211c818ef96 Fixes #238: subfolders datafolder
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
18 List<FileLoadFailure> failures = loader.LoadFiles ();
4211c818ef96 Fixes #238: subfolders datafolder
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
19 Assert.That(failures.Count, Is.EqualTo(2));
4211c818ef96 Fixes #238: subfolders datafolder
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
20 }
4211c818ef96 Fixes #238: subfolders datafolder
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
21 }
4211c818ef96 Fixes #238: subfolders datafolder
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
22 }
4211c818ef96 Fixes #238: subfolders datafolder
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
23