|
3 | 3 |
|
4 | 4 | MyWebApi is unit testing library providing easy fluent interface to test the ASP.NET Web API 2 framework. Inspired by [TestStack.FluentMVCTesting](https://github.com/TestStack/TestStack.FluentMVCTesting) and [ChaiJS](https://github.com/chaijs/chai). |
5 | 5 |
|
6 | | -[](https://ci.appveyor.com/project/ivaylokenov/mywebapi) |
| 6 | +[](https://ci.appveyor.com/project/ivaylokenov/mywebapi) [](https://www.nuget.org/packages/MyWebApi/) [](https://www.nuget.org/packages/MyWebApi/) [](https://coveralls.io/github/ivaylokenov/MyWebApi?branch=master) |
7 | 7 |
|
8 | 8 | ## Documentation |
9 | 9 |
|
10 | | -Please see the [documentation](https://github.com/ivaylokenov/MyWebApi/tree/master/documentation) for full list of available features. |
| 10 | +Please see the [documentation](https://github.com/ivaylokenov/MyWebApi/tree/master/documentation) for full list of available features. Everything listed in the documentation is 100% covered by [more than 800 unit tests](https://github.com/ivaylokenov/MyWebApi/tree/master/src/MyWebApi.Tests) and should work correctly. Almost all items in the [issues page](https://github.com/ivaylokenov/MyWebApi/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 class library. It will automatically reference the needed dependency of Microsoft.AspNet.WebApi.Core (≥ 5.1.0) for you. .NET 4.5+ is needed. |
| 14 | +You can install this library using NuGet into your Test class project. It will automatically reference the needed dependencies of Microsoft.AspNet.WebApi.Core (≥ 5.1.0) and Microsoft.Owin.Testing (≥ 3.0.1) for you. .NET 4.5+ is needed. |
15 | 15 |
|
16 | 16 | Install-Package MyWebApi |
17 | 17 |
|
@@ -116,20 +116,31 @@ MyWebApi |
116 | 116 | .OfType<SomeException>() |
117 | 117 | .AndAlso() |
118 | 118 | .WithMessage("Some exception message"); |
| 119 | + |
| 120 | +// run full pipeline integration test |
| 121 | +MyWebApi |
| 122 | + .Server() |
| 123 | + .Working(httpConfiguration) |
| 124 | + .WithHttpRequestMessage( |
| 125 | + request => request |
| 126 | + .WithMethod(HttpMethod.Post) |
| 127 | + .WithRequestUri("api/WebApiController/SomeAction/1")) |
| 128 | + .ShouldReturnHttpResponseMessage() |
| 129 | + .WithStatusCode(HttpStatusCode.OK) |
| 130 | + .AndAlso() |
| 131 | + .ContainingHeader("MyCustomHeader"); |
119 | 132 | ``` |
120 | 133 |
|
121 | 134 | ## License |
122 | 135 |
|
123 | 136 | Code by Ivaylo Kenov. Copyright 2015 Ivaylo Kenov. |
124 | | -This library is licensed under [GNU General Public License v3](https://tldrlegal.com/license/gnu-general-public-license-v3-(gpl-3)) (full terms and conditions [here](https://www.gnu.org/licenses/gpl.html)). Basically: |
125 | | - |
126 | | - - If you create software that uses GPL, you must license that software under GPL v3 (see [GPL FAQ](http://www.gnu.org/licenses/gpl-faq.html#IfLibraryIsGPL)) |
127 | | - - If you create software that uses GPL, you must release your source code (see [GPL FAQ](http://www.gnu.org/licenses/gpl-faq.html#IfLibraryIsGPL)) |
128 | | - - If you start with a GPL license, you cannot convert to another license |
129 | | - - **You cannot include MyWebApi in a closed source distribution under this license** |
| 137 | +This library is intended to be used in both open-source and commercial environments. To allow its use in as many |
| 138 | +situations as possible, MyWebApi is dual-licensed. You may choose to use MyWebApi under either the Apache License, |
| 139 | +Version 2.0, or the Microsoft Public License (Ms-PL). These licenses are essentially identical, but you are |
| 140 | +encouraged to evaluate both to determine which best fits your intended use. |
130 | 141 |
|
131 | | -If you have a really-coolish-and-nice open source or just closed source commercial project and you want to include MyWebApi in it, leave a question on the [issues page](https://github.com/ivaylokenov/MyWebApi/issues) and another license with the latest version of the library will be provided **free of charge** to you. |
| 142 | +Refer to [LICENSE](https://github.com/ivaylokenov/MyWebApi/blob/master/LICENSE) for detailed information. |
132 | 143 |
|
133 | 144 | ## Any questions, comments or additions? |
134 | 145 |
|
135 | | -Leave an issue on the [issues page](https://github.com/ivaylokenov/MyWebApi/issues) or send a [pull request](https://github.com/ivaylokenov/MyWebApi/pulls). |
| 146 | +If you have a feature request or bug report, leave an issue on the [issues page](https://github.com/ivaylokenov/MyWebApi/issues) or send a [pull request](https://github.com/ivaylokenov/MyWebApi/pulls). For general questions and comments, use the [StackOverflow](http://stackoverflow.com/) forum. |
0 commit comments