< Summary - Syki

Information
Class: Syki.Front.Features.Academic.CreateStudent.CreateStudentClient
Assembly: Front
File(s): /home/runner/work/syki/syki/Front/Features/Academic/CreateStudent/CreateStudentClient.cs
Tag: 4_16869239191
Line coverage
100%
Covered lines: 11
Uncovered lines: 0
Coverable lines: 11
Total lines: 19
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/CreateStudent/CreateStudentClient.cs

#LineLine coverage
 1namespace Syki.Front.Features.Academic.CreateStudent;
 2
 1803public class CreateStudentClient(HttpClient http) : IAcademicClient
 4{
 5    public async Task<OneOf<StudentOut, ErrorOut>> Create(string name, string email, Guid courseOfferingId, string? phon
 6    {
 1807        var data = new CreateStudentIn
 1808        {
 1809            Name = name,
 18010            Email = email,
 18011            PhoneNumber = phoneNumber,
 18012            CourseOfferingId = courseOfferingId,
 18013        };
 14
 18015        var response = await http.PostAsJsonAsync("/academic/students", data);
 16
 18017        return await response.Resolve<StudentOut>();
 18018    }
 19}