public void Setup()
        {
            _app = Application.WithPluginsFrom(new TypeCatalog(typeof (ArgumentEchoingPlugin)));
            _app.Error += (sender, e) => _errors.Add(e.Message + "\r\n" + e.Details);

            _chat = new ChatMock(NewUserMock());
            _mockSkype = new SkypeMock(() => _chat);
            _app.SetSkype(_mockSkype);
            _app.AttachToSkype();
        }
Beispiel #2
0
        private static Mock<Skype> MockedSkype(Chat chat, Application app)
        {
            var skype = new Mock<Skype>();
            var chatMsg = MockedChatMessage(chat);

            app.SetSkype(skype.Object);
            app.AttachToSkype();
            skype.Setup(s => s.get_Message(42)).Returns(chatMsg.Object);
            return skype;
        }