Aufgrund einer Störung des s3 Storage, könnten in nächster Zeit folgende GitLab Funktionen nicht zur Verfügung stehen: LFS, Container Registry, Job Artifacs, Uploads (Wiki, Bilder, Projekt-Exporte). Wir bitten um Verständnis. Es wird mit Hochdruck an der Behebung des Problems gearbeitet. Weitere Informationen zur Störung des Object Storage finden Sie hier: https://maintenance.itc.rwth-aachen.de/ticket/status/messages/59-object-storage-pilot

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

Enhance Test with GetId

parent 0477314e
......@@ -12,6 +12,7 @@ using Microsoft.AspNetCore.Routing;
using Microsoft.AspNetCore.Mvc.Infrastructure;
using Microsoft.AspNetCore.Mvc.Abstractions;
using Microsoft.AspNetCore.Mvc.Controllers;
using Coscine.Api.Project.ReturnObjects;
namespace Coscine.Api.Project.Tests
{
......@@ -126,6 +127,19 @@ namespace Coscine.Api.Project.Tests
{
var actionResult = _projectController.Index();
Assert.IsTrue(actionResult.GetType() == typeof(OkObjectResult));
actionResult = _projectController.Get(projects[0].Id.ToString());
Assert.IsTrue(actionResult.GetType() == typeof(OkObjectResult));
OkObjectResult okObjectResult = (OkObjectResult) actionResult;
Assert.IsTrue(okObjectResult.Value.GetType() == typeof(ProjectObject));
ProjectObject projectObject = (ProjectObject) okObjectResult.Value;
Assert.IsTrue(projectObject.Id == projects[0].Id);
Assert.IsTrue(projectObject.Description == projects[0].Description);
Assert.IsTrue(projectObject.DisplayName == projects[0].DisplayName);
Assert.IsTrue(projectObject.Organization == projects[0].Organization);
}
[Test]
......
......@@ -43,7 +43,7 @@ namespace Coscine.Api.Project
{
_jwtSecurityTokenHandler.ValidateToken(token, tokenValidationParameters, out SecurityToken securityToken);
}
catch(Exception e)
catch (Exception)
{
return false;
}
......
......@@ -5,9 +5,9 @@
//------------------------------------------------------------------------------
using System.Reflection;
[assembly: AssemblyTitle("api-demo")]
[assembly: AssemblyTitle("Project")]
[assembly: AssemblyCompany("RWTH Aachen University IT Center")]
[assembly: AssemblyProduct("api-demo")]
[assembly: AssemblyProduct("Project")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0.0")]
......
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