public void No_lecture_nodes() { using var scope = _factory.Services.CreateScope(); var controller = new ProgressController(_factory.Services.GetRequiredService <IMapper>(), scope.ServiceProvider.GetRequiredService <IProgressService>()); var code = ((NotFoundObjectResult)controller.GetLectureNodes(111).Result).StatusCode; code.ShouldBe(404); }
public void Finds_lecture_nodes() { using var scope = _factory.Services.CreateScope(); var controller = new ProgressController(_factory.Services.GetRequiredService <IMapper>(), scope.ServiceProvider.GetRequiredService <IProgressService>()); var node = ((OkObjectResult)controller.GetLectureNodes(1).Result).Value as List <KnowledgeNodeProgressDTO>; node.Count.ShouldBe(4); }