Beispiel #1
0
        public void WebServiceSourceDefinition_Equals_WebServiceSource_Null_Expected_False()
        {
            var webServiceSourceDefinition = new WebServiceSourceDefinition();

            const IWebServiceSource webServiceSource = null;

            var isEqual = webServiceSourceDefinition.Equals(webServiceSource);

            Assert.IsFalse(isEqual);
        }
 public void Save(IWebServiceSource model)
 {
     try
     {
         UpdateManagerProxy.SaveWebserviceSource(model, GlobalConstants.ServerWorkspaceID);
     }
     catch (Exception)
     {
         //
     }
 }
Beispiel #3
0
 /// <summary>
 ///     Initializes a new instance of the <see cref="T:System.Object" /> class.
 /// </summary>
 // ReSharper disable TooManyDependencies
 public WebServiceDefinition(string name, string path, IWebServiceSource source, IList <IServiceInput> inputs, IList <IServiceOutputMapping> outputMappings, string queryString, Guid id)
 // ReSharper restore TooManyDependencies
 {
     Name           = name;
     Path           = path;
     Source         = source;
     Inputs         = inputs;
     OutputMappings = outputMappings;
     QueryString    = queryString;
     Id             = id;
 }
Beispiel #4
0
 public bool Equals(IWebServiceSource other)
 {
     if (ReferenceEquals(null, other))
     {
         return(false);
     }
     if (ReferenceEquals(this, other))
     {
         return(true);
     }
     return(string.Equals(HostName, other.HostName) && Id == other.Id && string.Equals(Name, other.Name) && string.Equals(UserName, other.UserName) && string.Equals(Password, other.Password) && AuthenticationType == other.AuthenticationType && string.Equals(DefaultQuery, other.DefaultQuery));
 }
Beispiel #5
0
        public void SaveWebserviceSource(IWebServiceSource resource, Guid serverWorkspaceId)
        {
            var con            = Connection;
            var comsController = CommunicationControllerFactory.CreateController("SaveWebserviceSource");
            var serialiser     = new Dev2JsonSerializer();

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

            if (output.HasError)
            {
                throw new WarewolfSaveException(output.Message.ToString(), null);
            }
        }
Beispiel #6
0
        public bool Equals(IWebServiceSource other)
        {
            if (other is null)
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            var equals = true;

            equals &= string.Equals(HostName, other.HostName);
            equals &= Id == other.Id;
            equals &= string.Equals(Name, other.Name);
            equals &= string.Equals(UserName, other.UserName);
            equals &= string.Equals(Password, other.Password);
            equals &= AuthenticationType == other.AuthenticationType;
            equals &= string.Equals(DefaultQuery, other.DefaultQuery);

            return(equals);
        }
Beispiel #7
0
        public void WebPutActivityViewModel_TestActionSetSourceAndTestClickOkHasserialisationIssue()
        {
            //---------------Set up test pack-------------------
            var mod = GetMockModel();

            mod.IsTextResponse = true;
            var act           = GetEmptyPostActivity();
            var postViewModel = CreateViewModel(act, mod);

            postViewModel.ManageServiceInputViewModel = new InputViewForTests(postViewModel, mod);
            IWebServiceSource webServiceSource = postViewModel.SourceRegion.Sources.First();

            postViewModel.SourceRegion.SelectedSource = webServiceSource;
            postViewModel.TestInputCommand.Execute();
            postViewModel.ManageServiceInputViewModel.TestCommand.Execute(null);
            postViewModel.ManageServiceInputViewModel.IsEnabled = true;
            postViewModel.ManageServiceInputViewModel.OkCommand.Execute(null);
            //---------------Assert Precondition----------------
            //---------------Execute Test ----------------------
            Assert.AreEqual(postViewModel.OutputsRegion.Outputs.First().MappedFrom, "Result");

            //---------------Test Result -----------------------
        }
 public void TestConnection(IWebServiceSource serverSource) => UpdateManagerProxy.TestConnection(serverSource);
 public void Save(IWebServiceSource toDbSource)
 {
     _updateRepository.Save(toDbSource);
 }
 public void TestConnection(IWebServiceSource resource)
 {
     _updateRepository.TestConnection(resource);
 }
Beispiel #11
0
 /// <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(IWebServiceSource other)
 {
     return(Equals(other as WebServiceSourceDefinition));
 }
 public void EditSource(IWebServiceSource selectedSource)
 {
     _shell.EditResource(selectedSource);
 }
 public void EditSource(IWebServiceSource selectedSource)
 {
 }
Beispiel #14
0
 public void TestConnection(IWebServiceSource resource)
 {
     UpdateManagerProxy.TestConnection(resource);
 }
 public void Save(IWebServiceSource resource)
 {
     _updateRepository.Save(resource);
 }
 /// <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(IWebServiceSource other) => Equals(other as WebServiceSourceDefinition);