[Fat-develop] FAT/test/FAT.Test/Web TestTreeViewTest.cs,NONE,1.1
Brought to you by:
exortech
|
From: <exo...@us...> - 2004-01-15 00:57:02
|
Update of /cvsroot/fat/FAT/test/FAT.Test/Web
In directory sc8-pr-cvs1:/tmp/cvs-serv19380/test/FAT.Test/Web
Added Files:
TestTreeViewTest.cs
Log Message:
commits to fat will now be sent out on developer mailing list
--- NEW FILE: TestTreeViewTest.cs ---
using FAT.Core;
using FAT.Web;
using NMock;
using NUnit.Framework;
using System;
using System.Web.UI.HtmlControls;
namespace FAT.Test.Web
{
[TestFixture]
public class TestTreeViewTest : Assertion
{
[Test]
public void CreateControl()
{
ITestFile[] testFiles = new ITestFile[] { new TestFile("foo.fat"), new TestFile("bar.fat") };
Mock mockTestFileScanner = new DynamicMock(typeof(ITestFileScanner));
mockTestFileScanner.ExpectAndReturn("Scan", testFiles);
TestTreeView view = new TestTreeView((ITestFileScanner) mockTestFileScanner.MockInstance);
HtmlAnchor[] actualLinks = view.TestLinks;
AssertEquals(2, actualLinks.Length);
AssertEquals("?foo.fat", actualLinks[0].HRef);
AssertEquals("?bar.fat", actualLinks[1].HRef);
AssertEquals("foo", actualLinks[0].InnerText);
AssertEquals("bar", actualLinks[1].InnerText);
mockTestFileScanner.Verify();
}
// todo: how to organise in treeview?
// how to structure and make presentation
}
}
|