Skip to content

Commit

Permalink
Version 1.1.0
Browse files Browse the repository at this point in the history
Version 1.1.0
  • Loading branch information
ivaylokenov authored Nov 25, 2016
2 parents fb0f7b7 + c16f04a commit f0ce283
Show file tree
Hide file tree
Showing 159 changed files with 168,557 additions and 133,348 deletions.
24 changes: 15 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
<h1><img src="https://raw.githubusercontent.com/ivaylokenov/MyTested.AspNetCore.Mvc/master/tools/logo.png" align="left" alt="MyTested.AspNetCore.Mvc" width="100">&nbsp; MyTested.AspNetCore.Mvc - Fluent testing<br />&nbsp; framework for ASP.NET Core MVC</h1>
====================================

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.).
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.).

[![Build status](https://ci.appveyor.com/api/projects/status/3xlag3a7f87bg4on?svg=true)](https://ci.appveyor.com/project/ivaylokenov/mytested-aspnetcore-mvc) [![NuGet Version](http://img.shields.io/nuget/v/MyTested.AspNetCore.Mvc.svg?style=flat)](https://www.nuget.org/packages/MyTested.AspNetCore.Mvc/)
[![Build status](https://ci.appveyor.com/api/projects/status/3xlag3a7f87bg4on?svg=true)](https://ci.appveyor.com/project/ivaylokenov/mytested-aspnetcore-mvc) [![NuGet Version](http://img.shields.io/nuget/v/MyTested.AspNetCore.Mvc.svg?style=flat)](https://www.nuget.org/packages/MyTested.AspNetCore.Mvc/) [![NuGet Badge](https://buildstats.info/nuget/MyTested.AspNetCore.Mvc)](https://www.nuget.org/packages/MyTested.AspNetCore.Mvc/)

## Getting started

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.
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.

## Installation

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.
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.

Install-Package MyTested.AspNetCore.Mvc.Universe

Expand Down Expand Up @@ -55,7 +55,7 @@ Make sure to check out the [tutorial](http://docs.mytestedasp.net/tutorial/intro

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.

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.
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.

```c#
namespace MyApp.Tests
Expand Down Expand Up @@ -101,7 +101,7 @@ namespace MyApp.Tests.Controllers
}
```

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.
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.

## Examples

Expand Down Expand Up @@ -194,7 +194,7 @@ MyMvc

// tests whether model state error exists by using lambda expression
// and with specific tests for the error messages
// and tests whether the action return view with the same request model
// and tests whether the action returns view with the same request model
MyMvc
.Controller<MvcController>()
.Calling(c => c.MyAction(requestWithErrors))
Expand All @@ -209,7 +209,7 @@ MyMvc
.View(requestWithErrors);

// tests whether the action throws
// with exception of certain type and with certain message
// with an exception of particular type and with particular message
MyMvc
.Controller<MvcController>()
.Calling(c => c.ActionWithException())
Expand Down Expand Up @@ -238,6 +238,12 @@ MyMvc
.WithModelOfType<ResponseModel>();
```

## Versioning

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.

The public interface of My Tested ASP.NET Core MVC will not have any breaking changes when the version increases (unless entirely necessary).

## License

Code by Ivaylo Kenov. Copyright 2015-2016 Ivaylo Kenov ([http://mytestedasp.net](http://mytestedasp.net))
Expand All @@ -246,7 +252,7 @@ MyTested.AspNetCore.Mvc.Lite (the **FREE** and **UNLIMITED** version of the test

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.

Without a license code the full version of the library allows up to 100 assertions (around 25 test cases) per test project.
Without a license code, the full version of the library allows up to 100 assertions (around 25 test cases) per test project.

**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.

Expand Down
2 changes: 1 addition & 1 deletion global.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"projects": [ "src", "test", "samples" ],
"sdk": {
"version": "1.0.0-preview2-003121"
"version": "1.0.0-preview2-1-003177"
}
}
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"dependencies": {
"NETStandard.Library": "1.6.0",
"Microsoft.AspNetCore.Mvc": "1.0.1",
"Microsoft.AspNetCore.Identity.EntityFrameworkCore": "1.0.0",
"ApplicationParts.Models": "*",
"ApplicationParts.Services": "*"
"NETStandard.Library": "1.6.1",
"Microsoft.AspNetCore.Mvc": "1.1.0",
"Microsoft.AspNetCore.Identity.EntityFrameworkCore": "1.1.0",
"ApplicationParts.Models": "*",
"ApplicationParts.Services": "*"
},

"frameworks": {
Expand Down
Loading

0 comments on commit f0ce283

Please sign in to comment.