Commit ad8919d3 authored by Benedikt Heinrichs's avatar Benedikt Heinrichs
Browse files

Fix Tests

parent 19891e1f
......@@ -17,4 +17,4 @@ and then trust the generated certificate ```dotnet dev-certs https --trust```
## Testing the new server
The server ist now available under: https://localhost:5001/ (port may be diffrent!)
\ No newline at end of file
The server ist now available under: https://localhost:5001/ (port may be different!)
\ No newline at end of file
......@@ -17,4 +17,4 @@ and then trust the generated certificate ```dotnet dev-certs https --trust```
## Testing the new server
The server ist now available under: https://localhost:5001/ (port may be diffrent!)
\ No newline at end of file
The server ist now available under: https://localhost:5001/ (port may be different!)
\ No newline at end of file
......@@ -9,20 +9,11 @@ namespace Coscine.Api.Project.Tests
[TestFixture]
public class HomeControllerTests
{
private readonly ProjectController _homeController = new ProjectController();
private readonly ProjectController _projectController = new ProjectController();
[Test]
public void GreetTest()
{
var name = "Laurin";
var result = _homeController.Store(name);
Assert.IsInstanceOf<OkObjectResult>(result);
var okResult = (OkObjectResult)result;
Assert.IsInstanceOf<Greeting>(okResult.Value);
var greeting = (Greeting)okResult.Value;
Assert.IsTrue(greeting.Username == name);
}
[Test]
......@@ -30,7 +21,7 @@ namespace Coscine.Api.Project.Tests
{
var answer = "Hello World from a controller";
var result = _homeController.Index();
var result = _projectController.Index();
Assert.IsInstanceOf<OkObjectResult>(result);
var okResult = (OkObjectResult)result;
......
......@@ -6,7 +6,7 @@ using System.Threading.Tasks;
namespace Coscine.Api.Project.Models
{
public class Projects
public class Project
{
// TODO: Implement checking
......
......@@ -521,10 +521,13 @@
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="Authenticator.cs" />
<Compile Include="Configurator.cs" />
<Compile Include="ApplicationInformation.cs" />
<Compile Include="Controllers\ProjectController.cs" />
<Compile Include="Controllers\ResourceController.cs" />
<Compile Include="Models\Project.cs" />
<Compile Include="Models\User.cs" />
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Startup.cs" />
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment