view API/AbstractWarFoundryLoaderTests.cs @ 228:7c21ca1482cb

Re #419: Remove assumptions of a file-based install * Update tests to use new "loadable object" and "loadable object source" wrappers
author IBBoard <dev@ibboard.co.uk>
date Sat, 07 Jul 2012 21:02:53 +0100
parents 4211c818ef96
children
line source
1 using System;
2 using NUnit.Framework;
3 using IBBoard.WarFoundry.MockObjects;
4 using System.Collections.Generic;
5 using NUnit.Framework.SyntaxHelpers;
6 using System.IO;
7 using IBBoard.WarFoundry.API.Loading;
9 namespace IBBoard.WarFoundry.API
10 {
11 [TestFixture()]
12 public class AbstractWarFoundryLoaderTests
13 {
14 [Test()]
15 public void TestTriesToLoadFromSubdir()
16 {
17 MockWarFoundryLoader loader = new MockWarFoundryLoader();
18 loader.AddLoadSource(new LoadableObjectSourceDirectory("testdata/subdir-loading-test"));
19 List<FileLoadFailure> failures = loader.LoadFiles();
20 Assert.That(failures.Count, Is.EqualTo(2));
21 }
22 }
23 }