Sample project with Web API 2
Dependency Injection | Unit Testing | Security | User Interface | Logging |
---|---|---|---|---|
Used Ninject | Used Moq & xUnit | ⏳ | ⌛ | ❎ |
- Injection with
Unity↪️ Ninject - Unit Testing with
JustMock↪️ Moq - Routing /// :clubs: Conventional vs. :spades: Attribute Based (Semi-complete)
- Claims Based Authentication - Not implemented
- User Interface with Ng2 & TypeScript
- Logger - Not yet decided
public static class HttpRequestMessageFactory
{
public static HttpRequestMessage CreateRequestMessage(HttpMethod method = null, string uriString = null)
{
method = method ?? HttpMethod.Get;
var uri = string.IsNullOrWhiteSpace(uriString)
? new Uri("http://localhost:12345/api/whatever")
: new Uri(uriString);
var requestMessage = new HttpRequestMessage(method, uri);
requestMessage.SetConfiguration(new HttpConfiguration());
return requestMessage;
}
}
-
Integration Tests
-
Tests
- About 🔒 IHttpActionResult / Web API 2
- About 🔓 Unit Testing
-
NuDoq