view API/AbstractWarFoundryLoaderTests.cs @ 193:cf1c0a91eaa9

Re #350: Add requirement to allow N of unit for specific other units * Add first unit tests for factory, based on existing factory unit tests
author IBBoard <dev@ibboard.co.uk>
date Sat, 03 Dec 2011 16:53:36 +0000
parents 4211c818ef96
children 7c21ca1482cb
line wrap: on
line source

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));
		}
	}
}