예제 #1
0
 public override void Given()
 {
     CommonService.CreateFunctionLog(Arg.Any <FunctionLogDetails>()).Returns(true);
     LearnerService.FetchLearnerGenderAsync().Returns(new LearnerGenderResponse {
         IsSuccess = true
     });
     CommonService.UpdateFunctionLog(Arg.Any <FunctionLogDetails>()).Returns(true);
 }
예제 #2
0
        /// <summary>
        /// Main static method
        /// </summary>
        /// <param name="args">arguments list</param>
        static void Main(string[] args)
        {
            LearnerService learnerService = new LearnerService();
            ILearner       learner        = learnerService.GetCurrentLearner();

            LearnerView learnerView = new LearnerView(learner);

            learnerView.RenderView();
        }
예제 #3
0
        public void Teardown()
        {
            _archiveService      = null;
            _failoverDataService = null;
            _liveDataService     = null;
            _failoverService     = null;

            _sut = null;
        }
예제 #4
0
        public void Setup()
        {
            _archiveService      = A.Fake <ILearnerArchiveService>();
            _failoverDataService = A.Fake <ILearnerDataService>();
            _liveDataService     = A.Fake <ILearnerDataService>();
            _failoverService     = A.Fake <IFailoverService>();

            _sut = new LearnerService(_archiveService, _failoverDataService, _liveDataService, _failoverService);
        }
예제 #5
0
        public void Arrange()
        {
            _fixture     = new Fixture();
            _baseAddress = new Uri(@"http://localhost");
            _httpClient  = new TestHttpClient(_baseAddress);

            _learner = new LearnerFactory().GetExisting(_fixture.Create <LearnerModel>());

            _sut = new LearnerService(_httpClient, _version);
        }
예제 #6
0
 public LearnerController(MeetingService meetingService,
                          LearnerMeetingService learnerMeetingService,
                          FeedbackLearnerTeacherService feedbackLearnerTeacherService,
                          LearnerService learnerService,
                          TeacherService teacherService)
 {
     _meetingService                = meetingService;
     _learnerMeetingService         = learnerMeetingService;
     _feedbackLearnerTeacherService = feedbackLearnerTeacherService;
     _learnerService                = learnerService;
     _teacherService                = teacherService;
 }
예제 #7
0
        static void Main(string[] args)
        {
            //Console.WriteLine("Hello World!");

            // execute everying

            // first we need a learner service
            LearnerService learnerservice = new LearnerService();
            // it will autometically init the learner repo
            // we get a implemented object now
            // because get current learner will send any of the two
            // implemented class
            ILearner learner = learnerservice.getCurrentLearner();

            // init the object in view
            LearnerView view = new LearnerView(learner);

            view.RenderView();
        }
예제 #8
0
 public void Then_Expected_Methods_Are_Called()
 {
     CommonService.Received(1).CreateFunctionLog(Arg.Any <FunctionLogDetails>());
     LearnerService.Received(1).FetchLearnerGenderAsync();
     CommonService.Received(1).UpdateFunctionLog(Arg.Any <FunctionLogDetails>());
 }
예제 #9
0
 public AdminController(LearnerService learnerService,
                        CourseService courseService)
 {
     _learnerService = learnerService;
     _courseService  = courseService;
 }