Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using NUnit.Framework;
- namespace MvcBlogEngine.Tests.Controllers
- {
- public partial class WidgetControllerSpec
- {
- [TestFixture]
- public partial class TagCloud : BDDTest
- {
- [Test]
- public void Should_return_the_correct_view()
- {
- Given(we_have_a_controller);
- And(the_blog_post_service_contains_tags);
- When(tag_cloud_is_invoked);
- Then(the_resulting_view_should_be_the_TagCloud_view);
- }
- [Test]
- public void Should_contain_tags()
- {
- Given(we_have_a_controller);
- And(the_blog_post_service_contains_tags);
- When(tag_cloud_is_invoked);
- Then(the_resulting_view_should_contain_tags);
- }
- }
- }
- public class BDDTest
- {
- public void Given(Action a) { a.Invoke(); }
- public void And(Action a) { a.Invoke(); }
- public void When(Action a) { a.Invoke(); }
- public void Then(Action a) { a.Invoke(); }
- }
- }
Add Comment
Please, Sign In to add comment