コード例 #1
0
ファイル: LmsControllerTest.cs プロジェクト: tzkwizard/Azure
        private static void FakeLmsDashboardService()
        {
            _iLmsDashboardService = Substitute.For<ILmsDashboardService>();
            _iLmsDashboardService.GetMoreList(Arg.Any<string>(), Arg.Any<long>()).Returns(new LMSresult
            {
                time = 12,
                list = new List<PostMessage>(),
                moreData = true
            });
            _iLmsDashboardService.GetList(Arg.Is<string>(x => x != "")).Returns(new LMSresult
            {
                time = 12,
                list = new List<PostMessage>(),
                moreData = true
            });

            _iLmsDashboardService.SearchChat(Arg.Is<string>(x => x != ""), Arg.Any<long>()).Returns(new LMSChatresult
            {
                moreData = true,
                time = 15
            });
            _iLmsDashboardService.GetCalendar().Returns(new List<Topic> {new Topic(), new Topic()});
        }
コード例 #2
0
ファイル: LMSController.cs プロジェクト: tzkwizard/Azure
 public LmsController(IDbService iDbService, ILmsDashboardService iLmsDashboardService)
 { 
     _iDbService = iDbService; 
     _iLmsDashboardService = iLmsDashboardService;
 }