SetCredentials() public method

public SetCredentials ( Credentials credentials ) : void
credentials Credentials
return void
Beispiel #1
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();
        }