Merge pull request 'rebirth' (#1) from rebirth into master
continuous-integration/drone/push Build is failing Details

Reviewed-on: #1
pull/10/head
Pierre FERREIRA 2 years ago
commit a3c39f94dd

@ -0,0 +1,22 @@
kind: pipeline
type: docker
name: EfCsLoL
trigger:
event:
- push
steps:
# docker image build
- name: docker-build-and-push
image: plugins/docker
settings:
#dockerfile: Sources/Dockerfile
context: Sources/
registry: hub.codefirst.iut.uca.fr
repo: hub.codefirst.iut.uca.fr/corentin.richard/EntityFramework_ConsoDeServices_TP
username:
from_secret: SECRET_REGISTRY_USERNAME
password:
from_secret: SECRET_REGISTRY_PASSWORD

@ -9,6 +9,7 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="FluentAssertions" Version="6.9.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore.InMemory" Version="7.0.2" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="7.0.2" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="7.0.2">

@ -1,5 +1,6 @@
using API_LoL.Controllers;
using DTO;
using FluentAssertions;
using Microsoft.AspNetCore.Mvc;
using Model;
using StubLib;
@ -15,8 +16,15 @@ namespace Api_UT
List<ChampionDTO> list = new List<ChampionDTO> {new ChampionDTO("Akali","",""), new ChampionDTO("Aatrox", "", ""), new ChampionDTO("Ahri", "", ""), new ChampionDTO("Akshan", "", ""), new ChampionDTO("Bard", "", ""), new ChampionDTO("Alistar", "", "") };
ChampionsController api = new ChampionsController(new StubData());
IActionResult a = await api.Get();
Assert.IsNotNull(a);
Assert.AreEqual(list,((OkObjectResult)a).Value);
/// utilisation du nuggets fluentAssertion
//Assert.IsNotNull(a);
a.Should().NotBeNull();
//Assert.AreEqual(list,((OkObjectResult)a).Value);
var aObject = a as OkObjectResult;
aObject.Should().NotBeNull();
var championresult = aObject.Value as IEnumerable<ChampionDTO>;
list.Should().BeEquivalentTo(championresult);
}
[TestMethod]

Loading…
Cancel
Save