public GoogleTalkMessagingService(IGoogleTalkDataAccess dataAccess)
        {
            _DataAccess = dataAccess;

            _CredEventArgs = new CredentialEventArgs()
            {
                ServiceInfo = _ServiceInformation
            };
        }
Esempio n. 2
0
        public void Setup()
        {
            FakeDataAccess = MockRepository.GenerateMock<IGoogleTalkDataAccess>();
            Data_access_OnMessage_event = FakeDataAccess.GetEventRaiser(x=>x.OnMessage += null);
            GoogleMessagingService = new GoogleTalkMessagingService(FakeDataAccess);

            Context();
            Because();
        }
Esempio n. 3
0
 public void Setup()
 {
     GoogleDataAccessLayer = MockRepository.GenerateMock<IGoogleTalkDataAccess>();
     GooglePlugin = new GoogleTalkPlugIn.GoogleTalkMessagingService(GoogleDataAccessLayer);
     GooglePlugin.SetCredentials(
         new Credentials()
             {
                 UserName = "******",
                 Password = "",
                 ServiceInformation = GooglePlugin.GetInformation()
             });
     Context();
     Because();
 }
        public void Context()
        {
            MessageToSend = "Just a test tweet";
            Recipient = new Identity(RecipientAddress, ServiceInfo);

            GTalkDataAccess = MockRepository.GenerateStub<IGoogleTalkDataAccess>();
            GTalkDataAccess
                .Stub(x => x.SetAvailableMessage(null))
                .Constraints(Is.Anything())
                .WhenCalled(x => MessageSent = (string)x.Arguments[0]);

            Plugin = new GoogleTalkMessagingService(GTalkDataAccess);
            Plugin.SetCredentials(new Credentials() { UserName = "******" });

            Because();
        }