On Sunday 15 April 2007 21:54, Alan McGovern wrote: > Could you post up the entire test.cs file? Sure. But beware, this is very much a work in progress and I am a bloody newbie ...
Thanks for your time!
Joh
using System;
using System.Collections;
using System.IO;
using NUnit.Framework;
namespace NUnitSyncJpgRaw
{
[TestFixture()]
public class Test
{
#region Establishment of Testing Infrastructure
// The base path for the mock directory structure for
testing
const string TestDir = "/tmp/somepath";
// Construct the names needed for the mock directory
structure
ArrayList DSYears = new ArrayList();
DSYears.Add(1);
// DSYears.Add('1901');
//, "2004", "711", "1848", "1951", "1009");
// A function to create the mock directory structure
for testing
public void TestDirCreation(){
if (Directory.Exists(TestDir)) {
Directory.Delete(TestDir);
}
Directory.CreateDirectory(TestDir);
}
// A function to delete the mock directory structure
needed for testing
public void TestDirDeletion(){
if (Directory.Exists(TestDir)) {
Directory.Delete(TestDir);
}
}
#endregion
#region The actual Unit Tests
[Test()]
public void PrinterTest(){
SyncJpgRaw.Printer printer = new
SyncJpgRaw.Printer();
Assert.AreSame("Hello World!", printer.Print());
}
// A unit test to evaluate whether file globbing
performs as expected
[Test()]
public void GlobbingTest(){
TestDirCreation();
// Console.WriteLine("Length: {0}",DSYears.Length);
foreach (string y in DSYears){
Console.WriteLine("{0}\n",y);
}
}
#endregion
}
}
pgp8uIHTnGq3i.pgp
Description: PGP signature
_______________________________________________ Mono-list maillist - [email protected] http://lists.ximian.com/mailman/listinfo/mono-list
