Guest User

Untitled

a guest
Jun 19th, 2018
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.08 KB | None | 0 0
  1. using System;
  2. using NUnit.Framework;
  3.  
  4. namespace MvcBlogEngine.Tests.Controllers
  5. {
  6. public partial class WidgetControllerSpec
  7. {
  8. [TestFixture]
  9. public partial class TagCloud : BDDTest
  10. {
  11. [Test]
  12. public void Should_return_the_correct_view()
  13. {
  14. Given(we_have_a_controller);
  15. And(the_blog_post_service_contains_tags);
  16. When(tag_cloud_is_invoked);
  17. Then(the_resulting_view_should_be_the_TagCloud_view);
  18. }
  19.  
  20. [Test]
  21. public void Should_contain_tags()
  22. {
  23. Given(we_have_a_controller);
  24. And(the_blog_post_service_contains_tags);
  25. When(tag_cloud_is_invoked);
  26. Then(the_resulting_view_should_contain_tags);
  27. }
  28. }
  29. }
  30.  
  31. public class BDDTest
  32. {
  33. public void Given(Action a) { a.Invoke(); }
  34. public void And(Action a) { a.Invoke(); }
  35. public void When(Action a) { a.Invoke(); }
  36. public void Then(Action a) { a.Invoke(); }
  37. }
  38. }
Add Comment
Please, Sign In to add comment