예제 #1
0
        public async Task DeleteMaterial_Student_NoAccess()
        {
            Context
            .Setup(x => x.GetCurrentUserAsync())
            .ReturnsAsync(ModelsCreationHelper.CreateStudent);

            await Assert.ThrowsAsync <EducationSystemPublicException>
                (() => ServiceMaterial.DeleteMaterialAsync(999));
        }
예제 #2
0
 public async Task <IActionResult> DeleteMaterial([FromRoute] int id)
 {
     return(await Ok(() => _serviceMaterial.DeleteMaterialAsync(id)));
 }