annotate API/AbstractWarFoundryLoaderTests.cs @ 239:370bec16a364 default tip

Add initial testing for equipment with type (incomplete)
author IBBoard <dev@ibboard.co.uk>
date Sun, 16 Oct 2016 20:29:35 +0100
parents e173c5512067
children
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 System.IO;
228
7c21ca1482cb Re #419: Remove assumptions of a file-based install
IBBoard <dev@ibboard.co.uk>
parents: 77
diff changeset
6 using IBBoard.WarFoundry.API.Loading;
77
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();
228
7c21ca1482cb Re #419: Remove assumptions of a file-based install
IBBoard <dev@ibboard.co.uk>
parents: 77
diff changeset
17 loader.AddLoadSource(new LoadableObjectSourceDirectory("testdata/subdir-loading-test"));
7c21ca1482cb Re #419: Remove assumptions of a file-based install
IBBoard <dev@ibboard.co.uk>
parents: 77
diff changeset
18 List<FileLoadFailure> failures = loader.LoadFiles();
77
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