public void ExchangeSourceDefinition_Equals_ExchangeSource_Null_Expected_False()
        {
            var exchangeSourceDefinition = new ExchangeSourceDefinition();

            const IExchangeSource exchangeSource = null;

            var isEqual = exchangeSourceDefinition.Equals(exchangeSource);
            Assert.IsFalse(isEqual);
        }
Example #2
0
 public bool Equals(IExchangeSource other)
 {
     if (ReferenceEquals(null, other))
     {
         return(false);
     }
     if (ReferenceEquals(this, other))
     {
         return(true);
     }
     return(string.Equals(AutoDiscoverUrl, other.AutoDiscoverUrl) && string.Equals(UserName, other.UserName) && string.Equals(Password, other.Password) &&
            Timeout == other.Timeout);
 }
Example #3
0
        public void SaveExchangeSource(IExchangeSource exchangeSource, Guid serverWorkspaceID)
        {
            var con            = Connection;
            var comsController = CommunicationControllerFactory.CreateController("SaveExchangeServiceSource");
            var serialiser     = new Dev2JsonSerializer();

            comsController.AddPayloadArgument("ExchangeSource", serialiser.SerializeToBuilder(exchangeSource));
            var output = comsController.ExecuteCommand <IExecuteMessage>(con, GlobalConstants.ServerWorkspaceID);

            if (output.HasError)
            {
                throw new WarewolfSaveException(output.Message.ToString(), null);
            }
        }
        public string TestExchangeServiceSource(IExchangeSource emailServiceSource)
        {
            var con                       = Connection;
            var comsController            = CommunicationControllerFactory.CreateController("TestExchangeServiceSource");
            Dev2JsonSerializer serialiser = new Dev2JsonSerializer();

            comsController.AddPayloadArgument("ExchangeSource", serialiser.SerializeToBuilder(emailServiceSource));
            var output = comsController.ExecuteCommand <IExecuteMessage>(con, GlobalConstants.ServerWorkspaceID);

            if (output == null)
            {
                throw new WarewolfTestException(ErrorResource.UnableToContactServer, null);
            }
            if (output.HasError)
            {
                throw new WarewolfTestException(output.Message.ToString(), null);
            }
            return(output.Message.ToString());
        }
        public bool Equals(IExchangeSource other)
        {
            if (other is null)
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            var equals = true;

            equals &= string.Equals(AutoDiscoverUrl, other.AutoDiscoverUrl);
            equals &= string.Equals(UserName, other.UserName);
            equals &= string.Equals(Password, other.Password);
            equals &= Timeout == other.Timeout;

            return(equals);
        }
 public string TestConnection(IExchangeSource emailServiceSource) => UpdateManagerProxy.TestExchangeServiceSource(emailServiceSource);
 public void Save(IExchangeSource emailServiceSource) => UpdateManagerProxy.SaveExchangeSource(emailServiceSource, GlobalConstants.ServerWorkspaceID);
 public void Save(IExchangeSource toDbSource)
 {
     _updateRepository.Save(toDbSource);
 }
 public string TestConnection(IExchangeSource resource) => _updateRepository.TestConnection(resource);
 public void EditSource(IExchangeSource selectedSource)
 {
 }
        /// <summary>
        /// Indicates whether the current object is equal to another object of the same type.
        /// </summary>
        /// <returns>
        /// true if the current object is equal to the <paramref name="other"/> parameter; otherwise, false.
        /// </returns>
        /// <param name="other">An object to compare with this object.</param>

        public bool Equals(IExchangeSource other)
        {
            return(Equals(other as ExchangeSourceDefinition));
        }
Example #12
0
 public bool Equals(IExchangeSource other)
 {
     return(true);
 }
Example #13
0
 public bool Equals(IExchangeSource other) => true;
 public string TestConnection(IExchangeSource resource)
 {
     return(_updateRepository.TestConnection(resource));
 }
 public void EditSource(IExchangeSource selectedSource)
 {
     _shell.EditResource(selectedSource);
 }
 public bool Equals(IExchangeSource other) => Equals(other as ExchangeSourceDefinition);