DataListInputVariables() 공개 메소드

public DataListInputVariables ( string resourceId, System.Guid workspaceId, System.Guid dataListId ) : string
resourceId string
workspaceId System.Guid
dataListId System.Guid
리턴 string
예제 #1
0
 public void DataListInputWhereValidArgsDataListHasInputsScalarsAndRecSetExpectCorrectString()
 {
     //------------Setup for test--------------------------
     var workspaceID = Guid.NewGuid();
     var workspacePath = EnvironmentVariables.GetWorkspacePath(workspaceID);
     try
     {
         string completePath = Path.Combine(workspacePath, "Mo");
         if(Directory.Exists(completePath))
         {
             Directory.Delete(completePath);
         }
         var xml = XmlResource.Fetch("TestForEachOutput");
         var resourcePath = xml.Element("Category");
         Directory.CreateDirectory(completePath);
         Assert.IsNotNull(resourcePath);
         xml.Save(Path.Combine(workspacePath, resourcePath.Value + ".xml"));
         var resources = new Resources();
         //---------------Assert Preconditions------------------------------
         Assert.IsNotNull(resourcePath);
         var resource = ResourceCatalog.Instance.GetResource(workspaceID, resourcePath.Value);
         Assert.IsNotNull(resource);
         //------------Execute Test---------------------------
         var dataListInputVariables = resources.DataListInputVariables(resource.ResourceID.ToString(), workspaceID, Guid.Empty);
         //------------Assert Results-------------------------
         StringAssert.Contains(dataListInputVariables, "inputScalar");
         StringAssert.Contains(dataListInputVariables, "bothScalar");
     }
     finally
     {
         if(Directory.Exists(workspacePath))
         {
             DirectoryHelper.CleanUp(workspacePath);
         }
     }
 }
예제 #2
0
        public void DataListInputWhereValidArgsDataListHasNoInputsExpectEmptyString()
        {
            //------------Setup for test--------------------------
            LoadActivitiesPresentationDll();
            var workspaceID = Guid.NewGuid();

            var workspacePath = EnvironmentVariables.GetWorkspacePath(workspaceID);
            try
            {
                string completePath = Path.Combine(workspacePath, "Bugs");
                if(Directory.Exists(completePath))
                {
                    Directory.Delete(completePath);
                }
                var xml = XmlResource.Fetch("Bug6619");
                var resourcePath = xml.Element("Category");
                Directory.CreateDirectory(completePath);
                Assert.IsNotNull(resourcePath);
                xml.Save(Path.Combine(workspacePath, resourcePath.Value + ".xml"));
                var resources = new Resources();
                //-----------------Assert Preconditions-----------------------------
                Assert.IsNotNull(resourcePath);
                var resource = ResourceCatalog.Instance.GetResource(workspaceID, resourcePath.Value);
                Assert.IsNotNull(resource);
                //------------Execute Test---------------------------
                var dataListInputVariables = resources.DataListInputVariables(resource.ResourceID.ToString(), workspaceID, Guid.Empty);
                //------------Assert Results-------------------------
                Assert.IsTrue(string.IsNullOrEmpty(dataListInputVariables));
            }
            finally
            {
                if(Directory.Exists(workspacePath))
                {
                    DirectoryHelper.CleanUp(workspacePath);
                }
            }
        }
예제 #3
0
 public void DataListInputVariablesWhereInvalidArgsExpectEmptyString()
 {
     //------------Setup for test--------------------------
     var resources = new Resources();
     //------------Execute Test---------------------------
     var result = resources.DataListInputVariables("xxxx", Guid.Empty, Guid.Empty);
     //------------Assert Results-------------------------
     Assert.AreEqual("", result);
 }