Mercurial > repos > IBDev-IBBoard.WarFoundry.API.Tests
diff API/AbstractWarFoundryLoaderTests.cs @ 77:4211c818ef96
Fixes #238: subfolders datafolder
* Add unit test and mock object to test loading from sub-folders. We use any old file because it will fail to load it and report a failure without relying on loading logic.
author | IBBoard <dev@ibboard.co.uk> |
---|---|
date | Tue, 25 Jan 2011 21:04:25 +0000 |
parents | |
children | 7c21ca1482cb |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/API/AbstractWarFoundryLoaderTests.cs Tue Jan 25 21:04:25 2011 +0000 @@ -0,0 +1,23 @@ +using System; +using NUnit.Framework; +using IBBoard.WarFoundry.MockObjects; +using System.Collections.Generic; +using NUnit.Framework.SyntaxHelpers; +using System.IO; + +namespace IBBoard.WarFoundry.API +{ + [TestFixture()] + public class AbstractWarFoundryLoaderTests + { + [Test()] + public void TestTriesToLoadFromSubdir() + { + MockWarFoundryLoader loader = new MockWarFoundryLoader(); + loader.AddLoadDirectory(new DirectoryInfo("testdata/subdir-loading-test")); + List<FileLoadFailure> failures = loader.LoadFiles (); + Assert.That(failures.Count, Is.EqualTo(2)); + } + } +} +