< Summary

Information
Class: Syki.Front.Features.Academic.CreateCourseOffering.CreateCourseOfferingClient
Assembly: Front
File(s): /home/runner/work/syki/syki/Front/Features/Academic/CreateCourseOffering/CreateCourseOfferingClient.cs
Tag: 22_11348620282
Line coverage
100%
Covered lines: 12
Uncovered lines: 0
Coverable lines: 12
Total lines: 25
Line coverage: 100%
Branch coverage
N/A
Covered branches: 0
Total branches: 0
Branch coverage: N/A
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
.ctor(...)100%11100%
Create()100%11100%

File(s)

/home/runner/work/syki/syki/Front/Features/Academic/CreateCourseOffering/CreateCourseOfferingClient.cs

#LineLine coverage
 1namespace Syki.Front.Features.Academic.CreateCourseOffering;
 2
 2173public class CreateCourseOfferingClient(HttpClient http) : IAcademicClient
 4{
 5    public async Task<OneOf<CourseOfferingOut, ErrorOut>> Create(
 6        Guid campusId,
 7        Guid courseId,
 8        Guid courseCurriculumId,
 9        string? period,
 10        Shift shift
 11    ) {
 21712        var data = new CreateCourseOfferingIn
 21713        {
 21714            CampusId = campusId,
 21715            CourseId = courseId,
 21716            CourseCurriculumId = courseCurriculumId,
 21717            Period = period,
 21718            Shift = shift,
 21719        };
 20
 21721        var response = await http.PostAsJsonAsync("/academic/course-offerings", data);
 22
 21723        return await response.Resolve<CourseOfferingOut>();
 21724    }
 25}