Skip to content

Commit f351f51

Browse files
committed
Reduced code indentation in README.
1 parent 4f991ac commit f351f51

File tree

1 file changed

+19
-19
lines changed

1 file changed

+19
-19
lines changed

README.md

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -43,34 +43,34 @@ Make sure to check out [the documentation](http://docs.teststack.net/fluentmvcte
4343
Say you set up the following test class (this example with NUnit, but it will work for any test framework).
4444

4545
```c#
46-
using MyApp.Controllers;
47-
using NUnit.Framework;
48-
using TestStack.FluentMVCTesting;
49-
50-
namespace MyApp.Tests.Controllers
46+
using MyApp.Controllers;
47+
using NUnit.Framework;
48+
using TestStack.FluentMVCTesting;
49+
50+
namespace MyApp.Tests.Controllers
51+
{
52+
[TestFixture]
53+
class HomeControllerShould
5154
{
52-
[TestFixture]
53-
class HomeControllerShould
54-
{
55-
private HomeController _controller;
55+
private HomeController _controller;
5656

57-
[SetUp]
58-
public void Setup()
59-
{
60-
_controller = new HomeController();
61-
}
57+
[SetUp]
58+
public void Setup()
59+
{
60+
_controller = new HomeController();
6261
}
6362
}
63+
}
6464
```
6565

6666
Then you can create a test like this:
6767

6868
```c#
69-
[Test]
70-
public void Render_default_view_for_get_to_index()
71-
{
72-
_controller.WithCallTo(c => c.Index()).ShouldRenderDefaultView();
73-
}
69+
[Test]
70+
public void Render_default_view_for_get_to_index()
71+
{
72+
_controller.WithCallTo(c => c.Index()).ShouldRenderDefaultView();
73+
}
7474
```
7575

7676
This checks that when `_controller.Index()` is called then the `ActionResult` that is returned is of type `ViewResult` and that the view name returned is either "Index" or "" (the default view for the Index action); easy huh?

0 commit comments

Comments
 (0)