< Summary

Information
Class: Syki.Daemon.Configs.ServicesConfigs
Assembly: Daemon
File(s): /home/runner/work/syki/syki/Daemon/Configs/ServicesConfigs.cs
Tag: 22_11348620282
Line coverage
100%
Covered lines: 21
Uncovered lines: 0
Coverable lines: 21
Total lines: 51
Line coverage: 100%
Branch coverage
100%
Covered branches: 4
Total branches: 4
Branch coverage: 100%
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
AddServicesConfigs(...)100%44100%

File(s)

/home/runner/work/syki/syki/Daemon/Configs/ServicesConfigs.cs

#LineLine coverage
 1using Syki.Back.Configs;
 2using Syki.Daemon.Emails;
 3using Syki.Back.Features.Cross.CreateUser;
 4using Syki.Back.Features.Cross.ResetPassword;
 5using Syki.Back.Features.Academic.CreateClass;
 6using Syki.Back.Features.Academic.StartClasses;
 7using Syki.Back.Features.Academic.CreateTeacher;
 8using Syki.Back.Features.Academic.CreateStudent;
 9using Syki.Back.Features.Cross.SendResetPasswordToken;
 10using Syki.Back.Features.Student.CreateStudentEnrollment;
 11using Syki.Back.Features.Academic.CreateEnrollmentPeriod;
 12using Microsoft.Extensions.DependencyInjection.Extensions;
 13using Syki.Back.Features.Academic.ReleaseClassesForEnrollment;
 14using Syki.Back.Features.Academic.UpdateEnrollmentPeriod;
 15using Syki.Back.Features.Teacher.CreateLessonAttendance;
 16using Syki.Back.Features.Teacher.AddExamGradeNote;
 17using Syki.Back.Features.Academic.FinalizeClasses;
 18
 19namespace Syki.Daemon.Configs;
 20
 21public static class ServicesConfigs
 22{
 23    public static void AddServicesConfigs(this IServiceCollection services)
 24    {
 125        services.AddEfCoreConfigs();
 26
 127        services.AddScoped<CreateUserService>();
 128        services.AddScoped<CreateTeacherService>();
 129        services.AddScoped<CreateStudentService>();
 130        services.AddScoped<ResetPasswordService>();
 131        services.AddScoped<CreateClassService>();
 132        services.AddScoped<CreateEnrollmentPeriodService>();
 133        services.AddScoped<CreateStudentEnrollmentService>();
 134        services.AddScoped<SendResetPasswordTokenService>();
 135        services.AddScoped<ReleaseClassesForEnrollmentService>();
 136        services.AddScoped<StartClassesService>();
 137        services.AddScoped<UpdateEnrollmentPeriodService>();
 138        services.AddScoped<CreateLessonAttendanceService>();
 139        services.AddScoped<AddExamGradeNoteService>();
 140        services.AddScoped<FinalizeClassesService>();
 41
 142        services.AddScoped<IEmailsService, EmailsService>();
 143        if (Env.IsDevelopment() || Env.IsTesting())
 44        {
 145            services.Replace(ServiceDescriptor.Scoped<IEmailsService, FakeEmailsService>());
 46        }
 47
 148        services.AddIdentityConfigs();
 149        services.AddSykiTasksConfigs();
 150    }
 51}