You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+15-9Lines changed: 15 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,17 +1,17 @@
1
1
<h1><imgsrc="https://raw.githubusercontent.com/ivaylokenov/MyTested.AspNetCore.Mvc/master/tools/logo.png"align="left"alt="MyTested.AspNetCore.Mvc"width="100"> MyTested.AspNetCore.Mvc - Fluent testing<br /> framework for ASP.NET Core MVC</h1>
2
2
====================================
3
3
4
-
MyTested.AspNetCore.Mvc is a unit testing library providing easy fluent interface to test the [ASP.NET Core MVC](https://github.com/aspnet/Mvc) framework. It is testing framework agnostic, so you can combine it with a test runner of your choice (e.g. xUnit, NUnit, etc.).
4
+
MyTested.AspNetCore.Mvc is a unit testing library providing an easy fluent interface to test the [ASP.NET Core MVC](https://github.com/aspnet/Mvc) framework. It is testing framework agnostic so that you can combine it with a test runner of your choice (e.g. xUnit, NUnit, etc.).
It is strongly advised to start with the [tutorial](http://docs.mytestedasp.net/tutorial/intro.html) in order to get familiar with MyTested.AspNetCore.Mvc. Additionally, you may see the [testing guide](http://docs.mytestedasp.net/guide/intro.html) or the [API reference](http://docs.mytestedasp.net/api/index.html) for full list of available features. MyTested.AspNetCore.Mvc is 100% covered by [more than 1800 unit tests](https://github.com/ivaylokenov/MyTested.AspNetCore.Mvc/tree/master/test/) and should work correctly. Almost all items in the [issues page](https://github.com/ivaylokenov/MyTested.AspNetCore.Mvc/issues) are expected future features and enhancements.
10
+
It is strongly advised to start with the [tutorial](http://docs.mytestedasp.net/tutorial/intro.html) in order to get familiar with MyTested.AspNetCore.Mvc. Additionally, you may see the [testing guide](http://docs.mytestedasp.net/guide/intro.html) or the [API reference](http://docs.mytestedasp.net/api/index.html) for a full list of available features. MyTested.AspNetCore.Mvc is 100% covered by [more than 1800 unit tests](https://github.com/ivaylokenov/MyTested.AspNetCore.Mvc/tree/master/test/) and should work correctly. Almost all items in the [issues page](https://github.com/ivaylokenov/MyTested.AspNetCore.Mvc/issues) are expected future features and enhancements.
11
11
12
12
## Installation
13
13
14
-
You can install this library using NuGet into your test project (or reference it directly in your `project.json` file). Currently MyTested.AspNetCore.Mvc works with ASP.NET Core MVC 1.0.1.
14
+
You can install this library using NuGet into your test project (or reference it directly in your `project.json` file). Currently MyTested.AspNetCore.Mvc is fully compatible with ASP.NET Core MVC 1.1.0 and all older versions available on the official NuGet feed.
15
15
16
16
Install-Package MyTested.AspNetCore.Mvc.Universe
17
17
@@ -55,7 +55,7 @@ Make sure to check out the [tutorial](http://docs.mytestedasp.net/tutorial/intro
55
55
56
56
You can also check out the [provided samples](https://github.com/ivaylokenov/MyTested.AspNetCore.Mvc/tree/master/samples) for real-life ASP.NET Core MVC application testing.
57
57
58
-
The easiest way to start with MyTested.AspNetCore.Mvc is to create a `TestStartup` class at the root of the test project in order to register the dependency injection services which will be used by all test cases in the assembly. A fast solution is to inherit from the web project's `Startup` class and replace some of the services with mocked ones by using the provided extension methods.
58
+
The easiest way to start with MyTested.AspNetCore.Mvc is to create a `TestStartup` class at the root of the test project in order to register the dependency injection services which will be used by all test cases in the assembly. A quick solution is to inherit from the web project's `Startup` class and replace some of the services with mocked ones by using the provided extension methods.
Basically, MyTested.AspNetCore.Mvc throws an unhandled exception with a friendly error message if the assertion does not pass and the test fails. The example uses [xUnit](http://xunit.github.io/) but you can use any other framework you like. See the [samples](https://github.com/ivaylokenov/MyTested.AspNetCore.Mvc/tree/master/samples) for other types of test runners and `Startup` class configurations.
104
+
Basically, MyTested.AspNetCore.Mvc throws an unhandled exception with a friendly error message if the assertion does not pass and the test fails. The example uses [xUnit](http://xunit.github.io/), but you can use any other framework you like. See the [samples](https://github.com/ivaylokenov/MyTested.AspNetCore.Mvc/tree/master/samples) for other types of test runners and `Startup` class configurations.
105
105
106
106
## Examples
107
107
@@ -194,7 +194,7 @@ MyMvc
194
194
195
195
// tests whether model state error exists by using lambda expression
196
196
// and with specific tests for the error messages
197
-
// and tests whether the action return view with the same request model
197
+
// and tests whether the action returns view with the same request model
198
198
MyMvc
199
199
.Controller<MvcController>()
200
200
.Calling(c=>c.MyAction(requestWithErrors))
@@ -209,7 +209,7 @@ MyMvc
209
209
.View(requestWithErrors);
210
210
211
211
// tests whether the action throws
212
-
// with exception of certain type and with certain message
212
+
// with an exception of particular type and with particular message
213
213
MyMvc
214
214
.Controller<MvcController>()
215
215
.Calling(c=>c.ActionWithException())
@@ -238,6 +238,12 @@ MyMvc
238
238
.WithModelOfType<ResponseModel>();
239
239
```
240
240
241
+
## Versioning
242
+
243
+
My Tested ASP.NET Core MVC follows the ASP.NET Core MVC versions with which the testing framework is fully compatible. Specifically, the *major* and the *minor* versions will be incremented only when the MVC framework has a new official release. For example, version 1.0.0 of the testing framework will be fully compatible with ASP.NET Core MVC 1.0.0, version 1.1.0 will be fully compatible with ASP.NET Core MVC 1.1.0, version 1.3.15 will be fully compatible with ASP.NET Core MVC 1.3.0, and so on.
244
+
245
+
The public interface of My Tested ASP.NET Core MVC will not have any breaking changes when the version increases (unless entirely necessary).
246
+
241
247
## License
242
248
243
249
Code by Ivaylo Kenov. Copyright 2015-2016 Ivaylo Kenov ([http://mytestedasp.net](http://mytestedasp.net))
@@ -246,7 +252,7 @@ MyTested.AspNetCore.Mvc.Lite (the **FREE** and **UNLIMITED** version of the test
246
252
247
253
The source code of MyTested.AspNetCore.Mvc and its extensions (the full version of the testing library) is available under GNU Affero General Public License/FOSS License Exception.
248
254
249
-
Without a license code the full version of the library allows up to 100 assertions (around 25 test cases) per test project.
255
+
Without a license code, the full version of the library allows up to 100 assertions (around 25 test cases) per test project.
250
256
251
257
**Full-featured license codes can be requested for free by individuals, open-source projects, startups and educational institutions**. See [https://mytestedasp.net/Core/Mvc#free-usage-modal](https://mytestedasp.net/Core/Mvc#free-usage-modal) for more information.
0 commit comments