|
|
@ -52,12 +52,12 @@ namespace ApiTests
|
|
|
|
//Arange
|
|
|
|
//Arange
|
|
|
|
var SkinDto = new SkinDtoC
|
|
|
|
var SkinDto = new SkinDtoC
|
|
|
|
{
|
|
|
|
{
|
|
|
|
Name = "Project",
|
|
|
|
Name = "Project Pyke",
|
|
|
|
Description = "Test",
|
|
|
|
Description = "Test",
|
|
|
|
Icon = "",
|
|
|
|
Icon = "",
|
|
|
|
Image = new LargeImageDto(),
|
|
|
|
Image = new LargeImageDto(),
|
|
|
|
Price = 900,
|
|
|
|
Price = 900,
|
|
|
|
ChampionName = "aatrox"
|
|
|
|
ChampionName = "Volibear"
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
//Act
|
|
|
|
//Act
|
|
|
@ -76,17 +76,17 @@ namespace ApiTests
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
[TestMethod]
|
|
|
|
[TestMethod]
|
|
|
|
public async Task TestCountChampion()
|
|
|
|
public async Task TestCountSkins()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
//Arange
|
|
|
|
//Arange
|
|
|
|
var SkinDto = new SkinDtoC
|
|
|
|
var SkinDto = new SkinDtoC
|
|
|
|
{
|
|
|
|
{
|
|
|
|
Name = "Project",
|
|
|
|
Name = "Project Pyke",
|
|
|
|
Description = "Test",
|
|
|
|
Description = "Test",
|
|
|
|
Icon = "",
|
|
|
|
Icon = "",
|
|
|
|
Image = new LargeImageDto(),
|
|
|
|
Image = new LargeImageDto(),
|
|
|
|
Price = 900,
|
|
|
|
Price = 900,
|
|
|
|
ChampionName = "aatrox"
|
|
|
|
ChampionName = "Volibear"
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
//Act
|
|
|
|
//Act
|
|
|
@ -127,7 +127,7 @@ namespace ApiTests
|
|
|
|
Icon = "",
|
|
|
|
Icon = "",
|
|
|
|
Image = new LargeImageDto(),
|
|
|
|
Image = new LargeImageDto(),
|
|
|
|
Price = 900,
|
|
|
|
Price = 900,
|
|
|
|
ChampionName = "aatrox"
|
|
|
|
ChampionName = "Volibear"
|
|
|
|
};
|
|
|
|
};
|
|
|
|
var SkinDtoPut = new SkinDtoC
|
|
|
|
var SkinDtoPut = new SkinDtoC
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -136,7 +136,7 @@ namespace ApiTests
|
|
|
|
Icon = "",
|
|
|
|
Icon = "",
|
|
|
|
Image = new LargeImageDto(),
|
|
|
|
Image = new LargeImageDto(),
|
|
|
|
Price = 850,
|
|
|
|
Price = 850,
|
|
|
|
ChampionName = "aatrox"
|
|
|
|
ChampionName = "Volibear"
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
//Act
|
|
|
|
//Act
|
|
|
@ -161,20 +161,19 @@ namespace ApiTests
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
[TestMethod]
|
|
|
|
[TestMethod]
|
|
|
|
public async Task TestDeleteChampion()
|
|
|
|
public async Task TestDeleteSkin()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
//Arange
|
|
|
|
//Arange
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//Act
|
|
|
|
//Act
|
|
|
|
var total = await stub.SkinsMgr.GetNbItems();
|
|
|
|
var total = await stub.SkinsMgr.GetNbItems();
|
|
|
|
var skinsResult = await skins.Delete("Stinger");
|
|
|
|
var skinsResult = await skins.Delete("Project");
|
|
|
|
|
|
|
|
|
|
|
|
//Assert
|
|
|
|
//Assert
|
|
|
|
var objectResult = skinsResult as OkObjectResult;
|
|
|
|
var objectResult = skinsResult as NoContentResult;
|
|
|
|
Assert.IsNotNull(objectResult);
|
|
|
|
Assert.IsNotNull(objectResult);
|
|
|
|
|
|
|
|
|
|
|
|
Assert.AreEqual(objectResult.Value, true);
|
|
|
|
|
|
|
|
Assert.AreNotEqual(await stub.SkinsMgr.GetNbItems(), total);
|
|
|
|
Assert.AreNotEqual(await stub.SkinsMgr.GetNbItems(), total);
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|