コード例 #1
0
        public void Setup()
        {
            mockSkypeClient = new Mock <ISkypeClient> ();
            var identity = new Identity(username: "******", password: "******");

            skype = new SkypeMessenger(identity, mockSkypeClient.Object);
        }
コード例 #2
0
ファイル: With_execute.cs プロジェクト: perryofpeek/CCSkype
        public void Should_execute_the_main_processing()
        {
            var message = "someMessage";
            var ccTray = MockRepository.GenerateMock<ICcTray>();
            var projectWatcher = MockRepository.GenerateMock<IProjectwatcher>();
            var projects = new List<Project>();
            ccTray.Expect(x => x.FailedPipelines()).Return(projects);
            ccTray.Expect(x => x.Load());
            projectWatcher.Expect(x => x.Message(projects));
            var skypeMessenger = new SkypeMessenger(ccTray,projectWatcher);
            //Test
            skypeMessenger.Execute();

            //Assert
            ccTray.VerifyAllExpectations();
            projectWatcher.VerifyAllExpectations();
        }