Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using AutoMapper;
- using Ninject.Modules;
- using Profile.BL.Interfaces;
- using Profile.BL.Providers;
- using Profile.DAL.Context;
- using Profile.UI.Mappers;
- namespace Profile.UnitTests
- {
- public class NinjectTestingModule : NinjectModule
- {
- public override void Load()
- {
- // providers binding
- Bind<IUsersProvider>().To<UsersProvider>();
- Bind<ITraineeProvider>().To<TraineeProvider>();
- Bind<IProfileProvider>().To<ProfileProvider>();
- Bind<ISoftSkillProvider>().To<SoftSkillProvider>();
- Bind<IMainSkillProvider>().To<MainSkillProvider>();
- Bind<ICourseProvider>().To<CourseProvider>();
- Bind<IUniversityProvider>().To<UniversityProvider>();
- Bind<ILanguageProvider>().To<LanguageProvider>();
- Bind<ILinkProvider>().To<LinkProvider>();
- Bind<IJiraProvider>().To<JiraProvider>();
- Bind<IFileProvider>().To<FileProvider>();
- Bind<IProjectProvider>().To<ProjectProvider>();
- Bind<IMentorProvider>().To<MentorProvider>();
- Bind<IMentorReviewProvider>().To<MentorReviewProvider>();
- Bind<IScrumReviewProvider>().To<ScrumReviewProvider>();
- Bind<IScrumMasterProvider>().To<ScrumMasterProvider>();
- Bind<ITraineeReviewProvider>().To<TraineeReviewProvider>();
- // context binding
- Bind<IProfileContext>().To<ProfileContext>().WithConstructorArgument("dbConnectionString", "ProfileDB");
- // mappers binding
- Bind<LanguageMapper>().ToSelf().InSingletonScope();
- Bind<SkillMapper>().ToSelf().InSingletonScope();
- Bind<EducationMapper>().ToSelf().InSingletonScope();
- Bind<ProfileMapper>().ToSelf().InSingletonScope();
- Bind<ProjectMapper>().ToSelf().InSingletonScope();
- Bind<MentorMapper>().ToSelf().InSingletonScope();
- Bind<MentorReviewMapper>().ToSelf().InSingletonScope();
- Bind<ScrumReviewMapper>().ToSelf().InSingletonScope();
- Bind<TraineeReviewMapper>().ToSelf().InSingletonScope();
- // AutoMapperConfiguration binding
- Bind<IMapper>().ToMethod(AutoMapperCreator.GetMapper).InSingletonScope();
- // jira rest client binding
- //string jiraUrl = System.Configuration.ConfigurationManager.AppSettings["JiraUrl"];
- //string jiraUserName = System.Configuration.ConfigurationManager.AppSettings["JiraUserName"];
- //string jiraPassword = System.Configuration.ConfigurationManager.AppSettings["JiraPassword"];
- //Bind<IJiraClient>().To<JiraClient>()
- // .WithConstructorArgument("jiraUrl", jiraUrl)
- // .WithConstructorArgument("jiraUserName", jiraUserName)
- // .WithConstructorArgument("jiraPassword", jiraPassword);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement