annotate API/AbstractWarFoundryLoaderTests.cs @ 227:d8cd6b259a9f

Re #359: Add "only contained" attribute to unit types * Test to make sure sub-units are removed from the army
author IBBoard <dev@ibboard.co.uk>
date Mon, 16 Apr 2012 20:45:45 +0100
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