Correct Error for UT
continuous-integration/drone/push Build is passing Details

pull/8/head
Emre KARTAL 2 years ago
parent 8e6fd3984a
commit b603bcdd0d

@ -24,7 +24,7 @@ namespace ApiLol.Controllers
// GET: api/<RunePagesController>
/* [HttpGet]
[HttpGet]
public async Task<IActionResult> Get([FromQuery] PageRequest pageRequest)
{
_logger.LogInformation("Executing {Action} - RUNEPAGE with parameters: {Parameters}", nameof(Get), pageRequest);
@ -60,9 +60,9 @@ namespace ApiLol.Controllers
_logger.LogError(error.Message);
return BadRequest(error.Message);
}
}*/
}
/* // GET api/<RunePagesController>/5
// GET api/<RunePagesController>/5
[HttpGet("{name}")]
public async Task<IActionResult> Get(string name)
{
@ -117,6 +117,6 @@ namespace ApiLol.Controllers
[HttpDelete("{id}")]
public void Delete(int id)
{
}*/
}
}
}

@ -32,6 +32,7 @@ namespace ApiLol.Mapper
{
champ.AddSkill(skill.ToModel());
}
if (championDto.Characteristics != null)
champ.AddCharacteristics(championDto.Characteristics.Select(c => Tuple.Create(c.Key, c.Value)).ToArray());
return champ;
}

@ -6,6 +6,7 @@ using StubLib;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection.PortableExecutable;
using System.Text;
using System.Threading.Tasks;
@ -60,7 +61,8 @@ namespace ApiTests
Skills = new List<SkillDto>()
{
new SkillDto() {Name = "Test skill", Description="Empty", Type = SkillTypeDto.Unknown}
}
},
Characteristics = {}
};
//Act

@ -90,14 +90,14 @@ namespace ApiTests
//Act
var oldTotal = await stub.RunesMgr.GetNbItems();
var oldResult = await runes.GetCountSkins();
var oldResult = await runes.GetCountRunes();
await runes.Post(runeDto);
var objectResult = oldResult as OkObjectResult;
Assert.IsNotNull(objectResult);
var newTotal = await stub.RunesMgr.GetNbItems();
var newResult = await runes.GetCountSkins();
var newResult = await runes.GetCountRunes();
//Assert
var objectResultOld = oldResult as OkObjectResult;

Loading…
Cancel
Save