Esempio n. 1
0
 public void SetUp()
 {
     _skype = MockRepository.GenerateMock<ISkype>();
     _userCollection = MockRepository.GenerateMock<IUserCollection>();
     _chats = MockRepository.GenerateMock<IChats>();
     _messengerClient = new MessengerClient(_skype, _userCollection,_chats);
     _skypeClient = MockRepository.GenerateMock<IClient>();
 }
Esempio n. 2
0
        private void clearBuddyList(IMessengerClient i_Client)
        {
            IBuddyList buddyList = i_Client.BuddyList;

            foreach (BuddyListItem item in buddyList.Buddies.ToList())
            {
                buddyList.RemoveBuddy(item.Identity);
            }
        }
        public void Subscribe(IMessengerClient client)
        {
            if (!subscribers.ContainsKey(client.Name))
            {
                subscribers.Add(client.Name, client);
            }

            EnqueueMessage(client.Name, string.Empty, MessageCode.Connect);
        }
 public MessengerService(IOptions <FacebookSettings> fbSettings,
                         IMessengerClient messengerClient,
                         IZomatoClient zomatoClient,
                         ILoggerAdapter logger)
 {
     _fbSettings      = fbSettings.Value;
     _messengerClient = messengerClient;
     _zomatoClient    = zomatoClient;
     _logger          = logger;
 }
Esempio n. 5
0
 public Loader(IMessengerClient messengerClient,IBuildCollection buildCollection)
 {
     _messengerClient = messengerClient;
     _buildCollection = buildCollection;
 }
Esempio n. 6
0
 public UserGroup(IMessengerClient messengerClient, List<User> users, string name)
 {
     Name = name;
     _messengerClient = messengerClient;
     _users = users;
 }
 public void Unsubscribe(IMessengerClient client)
 {
     EnqueueMessage(client.Name, string.Empty, MessageCode.Disconnect);
 }
Esempio n. 8
0
 public void SetUp()
 {
     _messengerClient = MockRepository.GenerateMock<IMessengerClient>();
 }