Skip to content

Instantly share code, notes, and snippets.

@cubanx
Created March 26, 2012 18:40
Show Gist options
  • Save cubanx/2208588 to your computer and use it in GitHub Desktop.
Save cubanx/2208588 to your computer and use it in GitHub Desktop.
using System.Web.Mvc;
using Moq;
using NUnit.Framework;
using Specs.Core;
using Specs.Reporting.Mixins;
using TNW.Common.nHibernate;
using TNW.Reporting.Web.Controllers;
namespace Specs.Reporting.Web.Controllers
{
[TestFixture]
public class WhenAUserHasADefaultDashboard : BddBase<WhenAUserHasADefaultDashboard>, GivenPersonsForReporting
{
private DashboardController DashboardController;
private ViewResult ViewResult;
public WhenAUserHasADefaultDashboard() {
BeforeEach(() => {
var person = Given.APerson().With(a => a.DefaultDashboard());
DashboardController = new DashboardController(new Mock<ITNWSqlSession>().Object, person);
ViewResult = DashboardController.Index() as ViewResult;
});
}
[Test]
public void It_should_return_a_view_result() {
Expect(ViewResult, Not.Null);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment