Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Coscine
backend
apis
Project
Commits
ad8919d3
Commit
ad8919d3
authored
Jul 02, 2019
by
Benedikt Heinrichs
Browse files
Fix Tests
parent
19891e1f
Changes
5
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
README.md
View file @
ad8919d3
...
...
@@ -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
docs/home.md
View file @
ad8919d3
...
...
@@ -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
src/Project.Tests/HomeControllerTests.cs
View file @
ad8919d3
...
...
@@ -9,20 +9,11 @@ namespace Coscine.Api.Project.Tests
[
TestFixture
]
public
class
HomeControllerTests
{
private
readonly
ProjectController
_
home
Controller
=
new
ProjectController
();
private
readonly
ProjectController
_
project
Controller
=
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
=
_
home
Controller
.
Index
();
var
result
=
_
project
Controller
.
Index
();
Assert
.
IsInstanceOf
<
OkObjectResult
>(
result
);
var
okResult
=
(
OkObjectResult
)
result
;
...
...
src/Project/Models/Project.cs
View file @
ad8919d3
...
...
@@ -6,7 +6,7 @@ using System.Threading.Tasks;
namespace
Coscine.Api.Project.Models
{
public
class
Project
s
public
class
Project
{
// TODO: Implement checking
...
...
src/Project/Project.csproj
View file @
ad8919d3
...
...
@@ -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"
/>
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment