Skip to content
Snippets Groups Projects
Commit ad8919d3 authored by Benedikt Heinrichs's avatar Benedikt Heinrichs
Browse files

Fix Tests

parent 19891e1f
No related branches found
No related tags found
2 merge requests!4Product/118 migration for project api,!1Topic/128 web apis
......@@ -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" />
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment