Example #1
0
        public void ServiceInvoker_Invoke_WhenDbTest_ExpectValidDbRecordsetDataWithCommasReplacedForUIParsing()
        {
            //------------Setup for test--------------------------


            const string args    = @"{""resourceID"":""00000000-0000-0000-0000-000000000000"",""resourceType"":""DbService"",""resourceName"":null,""resourcePath"":null,""source"":{""ServerType"":""SqlDatabase"",""Server"":""RSAKLFSVRGENDEV"",""DatabaseName"":""Dev2TestingDB"",""Port"":1433,""AuthenticationType"":""User"",""UserID"":""testUser"",""Password"":""test123"",""ConnectionString"":""Data Source=RSAKLFSVRGENDEV,1433;Initial Catalog=Dev2TestingDB;User ID=testUser;Password=test123;"",""ResourceID"":""eb2de0a3-4814-40b8-b825-f4601bfdb155"",""ResourceType"":""DbSource"",""ResourceName"":""TU Greenpoint DB"",""ResourcePath"":""SQL SRC"",""IsValid"":false,""Errors"":null,""ReloadActions"":false},""method"":{""Name"":""dbo.pr_MapLocationsGetAll"",""ExecuteAction"":""dbo.pr_MapLocationsGetAll"",""SourceCode"":""-- =============================================\r<br />-- Author:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<Author,,Name>\r<br />-- Create date: <Create Date,,>\r<br />-- Description:&nbsp;&nbsp;&nbsp;&nbsp;<Description,,>\r<br />-- =============================================\r<br />CREATE PROCEDURE dbo.proc_GetAllMapLocations \r<br />&nbsp;&nbsp;&nbsp;&nbsp;\r<br />AS\r<br />BEGIN\r<br />&nbsp;&nbsp;&nbsp;&nbsp;SET NOCOUNT ON;\r<br />\r<br />    SELECT MapLocationID, StreetAddress,Latitude,Longitude FROM dbo.MapLocation ORDER BY MapLocationID ASC\r<br />END\r<br />"",""Parameters"":[]},""recordset"":{""Name"":""dbo_proc_GetAllMapLocations"",""Fields"":[],""Records"":[],""HasErrors"":false,""ErrorMessage"":""""}}";
            var          service = JsonConvert.DeserializeObject <DbService>(args);

            Mock <IResourceCatalog> mockedResourceCatelog = new Mock <IResourceCatalog>();

            mockedResourceCatelog.Setup(a => a.GetResource <DbSource>(It.IsAny <Guid>(), service.Source.ResourceID)).Returns(service.Source as DbSource);

            //------------Execute Test---------------------------
            var services = new TestDbServices(mockedResourceCatelog.Object);
            var result   = services.DbTest(args, Guid.NewGuid(), Guid.Empty);

            // __COMMA__ is expected as this means sample has been delimited properly by the server.
            // It also means there is an implicit contract between the UI and server to handle __COMMA__ back into ,

            //
            // 2013.12.11 - COMMUNITY BUG - 341463 - Fixed expected to include empty cells
            //
            const string expected = "{\"Name\":\"dbo_proc_GetAllMapLocations\",\"HasErrors\":false,\"ErrorMessage\":\"\",\"Fields\":[{\"Name\":\"MapLocationID\",\"Alias\":\"MapLocationID\",\"RecordsetAlias\":null,\"Path\":{\"$type\":\"Dev2.Converters.Graph.DataTable.DataTablePath, Dev2.Core\",\"ActualPath\":\"MapLocationID\",\"DisplayPath\":\"MapLocationID\",\"SampleData\":\"1__COMMA__2__COMMA__3__COMMA__4__COMMA__5__COMMA__7__COMMA__8__COMMA__9__COMMA__10__COMMA__11__COMMA__\",\"OutputExpression\":\"\"}},{\"Name\":\"StreetAddress\",\"Alias\":\"StreetAddress\",\"RecordsetAlias\":null,\"Path\":{\"$type\":\"Dev2.Converters.Graph.DataTable.DataTablePath, Dev2.Core\",\"ActualPath\":\"StreetAddress\",\"DisplayPath\":\"StreetAddress\",\"SampleData\":\"19 Pineside Road, New Germany__COMMA__1244 Old North Coast Rd, Redhill__COMMA__Westmead Road, Westmead__COMMA__Turquoise Road, Queensmead__COMMA__Old Main Road, Isipingo__COMMA__2 Brook Street North, Warwick Junction__COMMA__Bellair Road, Corner Bellair & Edwin Swales/Sarnia Arterial__COMMA__Riverside Road, Durban North__COMMA__Malacca Road, Durban North__COMMA__Glanville Road, Woodlands__COMMA__\",\"OutputExpression\":\"\"}},{\"Name\":\"Latitude\",\"Alias\":\"Latitude\",\"RecordsetAlias\":null,\"Path\":{\"$type\":\"Dev2.Converters.Graph.DataTable.DataTablePath, Dev2.Core\",\"ActualPath\":\"Latitude\",\"DisplayPath\":\"Latitude\",\"SampleData\":\"99.99__COMMA__99.99__COMMA__99.99__COMMA__99.99__COMMA__99.99__COMMA__99.99__COMMA__99.99__COMMA__99.99__COMMA__99.99__COMMA__99.99__COMMA__\",\"OutputExpression\":\"\"}},{\"Name\":\"Longitude\",\"Alias\":\"Longitude\",\"RecordsetAlias\":null,\"Path\":{\"$type\":\"Dev2.Converters.Graph.DataTable.DataTablePath, Dev2.Core\",\"ActualPath\":\"Longitude\",\"DisplayPath\":\"Longitude\",\"SampleData\":\"66.6__COMMA__66.6__COMMA__66.6__COMMA__66.6__COMMA__66.6__COMMA__66.6__COMMA__66.6__COMMA__66.6__COMMA__66.6__COMMA__66.6__COMMA__\",\"OutputExpression\":\"\"}}],\"Records\":[{\"Label\":\"dbo_proc_GetAllMapLocations(1)\",\"Name\":\"dbo_proc_GetAllMapLocations\",\"Count\":4,\"Cells\":[{\"Name\":\"dbo_proc_GetAllMapLocations(1).MapLocationID\",\"Label\":\"MapLocationID\",\"Value\":\"1\"},{\"Name\":\"dbo_proc_GetAllMapLocations(1).StreetAddress\",\"Label\":\"StreetAddress\",\"Value\":\"19 Pineside Road, New Germany\"},{\"Name\":\"dbo_proc_GetAllMapLocations(1).Latitude\",\"Label\":\"Latitude\",\"Value\":\"99.99\"},{\"Name\":\"dbo_proc_GetAllMapLocations(1).Longitude\",\"Label\":\"Longitude\",\"Value\":\"66.6\"}]},{\"Label\":\"dbo_proc_GetAllMapLocations(2)\",\"Name\":\"dbo_proc_GetAllMapLocations\",\"Count\":4,\"Cells\":[{\"Name\":\"dbo_proc_GetAllMapLocations(2).MapLocationID\",\"Label\":\"MapLocationID\",\"Value\":\"2\"},{\"Name\":\"dbo_proc_GetAllMapLocations(2).StreetAddress\",\"Label\":\"StreetAddress\",\"Value\":\"1244 Old North Coast Rd, Redhill\"},{\"Name\":\"dbo_proc_GetAllMapLocations(2).Latitude\",\"Label\":\"Latitude\",\"Value\":\"99.99\"},{\"Name\":\"dbo_proc_GetAllMapLocations(2).Longitude\",\"Label\":\"Longitude\",\"Value\":\"66.6\"}]},{\"Label\":\"dbo_proc_GetAllMapLocations(3)\",\"Name\":\"dbo_proc_GetAllMapLocations\",\"Count\":4,\"Cells\":[{\"Name\":\"dbo_proc_GetAllMapLocations(3).MapLocationID\",\"Label\":\"MapLocationID\",\"Value\":\"3\"},{\"Name\":\"dbo_proc_GetAllMapLocations(3).StreetAddress\",\"Label\":\"StreetAddress\",\"Value\":\"Westmead Road, Westmead\"},{\"Name\":\"dbo_proc_GetAllMapLocations(3).Latitude\",\"Label\":\"Latitude\",\"Value\":\"99.99\"},{\"Name\":\"dbo_proc_GetAllMapLocations(3).Longitude\",\"Label\":\"Longitude\",\"Value\":\"66.6\"}]},{\"Label\":\"dbo_proc_GetAllMapLocations(4)\",\"Name\":\"dbo_proc_GetAllMapLocations\",\"Count\":4,\"Cells\":[{\"Name\":\"dbo_proc_GetAllMapLocations(4).MapLocationID\",\"Label\":\"MapLocationID\",\"Value\":\"4\"},{\"Name\":\"dbo_proc_GetAllMapLocations(4).StreetAddress\",\"Label\":\"StreetAddress\",\"Value\":\"Turquoise Road, Queensmead\"},{\"Name\":\"dbo_proc_GetAllMapLocations(4).Latitude\",\"Label\":\"Latitude\",\"Value\":\"99.99\"},{\"Name\":\"dbo_proc_GetAllMapLocations(4).Longitude\",\"Label\":\"Longitude\",\"Value\":\"66.6\"}]},{\"Label\":\"dbo_proc_GetAllMapLocations(5)\",\"Name\":\"dbo_proc_GetAllMapLocations\",\"Count\":4,\"Cells\":[{\"Name\":\"dbo_proc_GetAllMapLocations(5).MapLocationID\",\"Label\":\"MapLocationID\",\"Value\":\"5\"},{\"Name\":\"dbo_proc_GetAllMapLocations(5).StreetAddress\",\"Label\":\"StreetAddress\",\"Value\":\"Old Main Road, Isipingo\"},{\"Name\":\"dbo_proc_GetAllMapLocations(5).Latitude\",\"Label\":\"Latitude\",\"Value\":\"99.99\"},{\"Name\":\"dbo_proc_GetAllMapLocations(5).Longitude\",\"Label\":\"Longitude\",\"Value\":\"66.6\"}]},{\"Label\":\"dbo_proc_GetAllMapLocations(6)\",\"Name\":\"dbo_proc_GetAllMapLocations\",\"Count\":4,\"Cells\":[{\"Name\":\"dbo_proc_GetAllMapLocations(6).MapLocationID\",\"Label\":\"MapLocationID\",\"Value\":\"7\"},{\"Name\":\"dbo_proc_GetAllMapLocations(6).StreetAddress\",\"Label\":\"StreetAddress\",\"Value\":\"2 Brook Street North, Warwick Junction\"},{\"Name\":\"dbo_proc_GetAllMapLocations(6).Latitude\",\"Label\":\"Latitude\",\"Value\":\"99.99\"},{\"Name\":\"dbo_proc_GetAllMapLocations(6).Longitude\",\"Label\":\"Longitude\",\"Value\":\"66.6\"}]},{\"Label\":\"dbo_proc_GetAllMapLocations(7)\",\"Name\":\"dbo_proc_GetAllMapLocations\",\"Count\":4,\"Cells\":[{\"Name\":\"dbo_proc_GetAllMapLocations(7).MapLocationID\",\"Label\":\"MapLocationID\",\"Value\":\"8\"},{\"Name\":\"dbo_proc_GetAllMapLocations(7).StreetAddress\",\"Label\":\"StreetAddress\",\"Value\":\"Bellair Road, Corner Bellair & Edwin Swales/Sarnia Arterial\"},{\"Name\":\"dbo_proc_GetAllMapLocations(7).Latitude\",\"Label\":\"Latitude\",\"Value\":\"99.99\"},{\"Name\":\"dbo_proc_GetAllMapLocations(7).Longitude\",\"Label\":\"Longitude\",\"Value\":\"66.6\"}]},{\"Label\":\"dbo_proc_GetAllMapLocations(8)\",\"Name\":\"dbo_proc_GetAllMapLocations\",\"Count\":4,\"Cells\":[{\"Name\":\"dbo_proc_GetAllMapLocations(8).MapLocationID\",\"Label\":\"MapLocationID\",\"Value\":\"9\"},{\"Name\":\"dbo_proc_GetAllMapLocations(8).StreetAddress\",\"Label\":\"StreetAddress\",\"Value\":\"Riverside Road, Durban North\"},{\"Name\":\"dbo_proc_GetAllMapLocations(8).Latitude\",\"Label\":\"Latitude\",\"Value\":\"99.99\"},{\"Name\":\"dbo_proc_GetAllMapLocations(8).Longitude\",\"Label\":\"Longitude\",\"Value\":\"66.6\"}]},{\"Label\":\"dbo_proc_GetAllMapLocations(9)\",\"Name\":\"dbo_proc_GetAllMapLocations\",\"Count\":4,\"Cells\":[{\"Name\":\"dbo_proc_GetAllMapLocations(9).MapLocationID\",\"Label\":\"MapLocationID\",\"Value\":\"10\"},{\"Name\":\"dbo_proc_GetAllMapLocations(9).StreetAddress\",\"Label\":\"StreetAddress\",\"Value\":\"Malacca Road, Durban North\"},{\"Name\":\"dbo_proc_GetAllMapLocations(9).Latitude\",\"Label\":\"Latitude\",\"Value\":\"99.99\"},{\"Name\":\"dbo_proc_GetAllMapLocations(9).Longitude\",\"Label\":\"Longitude\",\"Value\":\"66.6\"}]},{\"Label\":\"dbo_proc_GetAllMapLocations(10)\",\"Name\":\"dbo_proc_GetAllMapLocations\",\"Count\":4,\"Cells\":[{\"Name\":\"dbo_proc_GetAllMapLocations(10).MapLocationID\",\"Label\":\"MapLocationID\",\"Value\":\"11\"},{\"Name\":\"dbo_proc_GetAllMapLocations(10).StreetAddress\",\"Label\":\"StreetAddress\",\"Value\":\"Glanville Road, Woodlands\"},{\"Name\":\"dbo_proc_GetAllMapLocations(10).Latitude\",\"Label\":\"Latitude\",\"Value\":\"99.99\"},{\"Name\":\"dbo_proc_GetAllMapLocations(10).Longitude\",\"Label\":\"Longitude\",\"Value\":\"66.6\"}]},{\"Label\":\"dbo_proc_GetAllMapLocations(11)\",\"Name\":\"dbo_proc_GetAllMapLocations\",\"Count\":4,\"Cells\":[{\"Name\":\"dbo_proc_GetAllMapLocations(11).MapLocationID\",\"Label\":\"MapLocationID\",\"Value\":\"\"},{\"Name\":\"dbo_proc_GetAllMapLocations(11).StreetAddress\",\"Label\":\"StreetAddress\",\"Value\":\"\"},{\"Name\":\"dbo_proc_GetAllMapLocations(11).Latitude\",\"Label\":\"Latitude\",\"Value\":\"\"},{\"Name\":\"dbo_proc_GetAllMapLocations(11).Longitude\",\"Label\":\"Longitude\",\"Value\":\"\"}]}]}";

            //------------Assert Results-------------------------
            var res = result.ToString();

            Assert.AreEqual(expected, res);
        }
Example #2
0
        public void DbServices_Save_ValidArgsAndEmptyResourceID_AssignsNewResourceID()
        {
            var svc = CreateDev2TestingDbService();

            svc.ResourceID = Guid.Empty;
            var args = svc.ToString();

            var workspaceID   = Guid.NewGuid();
            var workspacePath = EnvironmentVariables.GetWorkspacePath(workspaceID);

            try
            {
                var services = new TestDbServices();

                //------------Execute Test---------------------------
                var result = services.Save(args, workspaceID, Guid.Empty);

                //Assert Assigns New Resource ID
                var service = JsonConvert.DeserializeObject <Service>(result);
                Assert.AreNotEqual(Guid.Empty, service.ResourceID);
            }
            finally
            {
                if (Directory.Exists(workspacePath))
                {
                    DirectoryHelper.CleanUp(workspacePath);
                }
            }
        }
Example #3
0
        public void DbServices_TestService_NestedTransactions_DoesNotThrowException()
        {
            //------------Setup for test--------------------------
            var dbService = new DbService
            {
                Recordset = new Recordset(),
                Method    = new ServiceMethod
                {
                    Name          = "dbo.Pr_GeneralTestNestedTransaction",
                    ExecuteAction = "dbo.Pr_GeneralTestNestedTransaction"
                },
                Source = SqlServerTests.CreateDev2TestingDbSource()
            };
            var args = JsonConvert.SerializeObject(dbService);

            Mock <IResourceCatalog> mockedResourceCatelog = new Mock <IResourceCatalog>();

            mockedResourceCatelog.Setup(a => a.GetResource <DbSource>(Guid.Empty, dbService.Source.ResourceID)).Returns(dbService.Source as DbSource);

            var dbServices = new TestDbServices(mockedResourceCatelog.Object, new Mock <IAuthorizationService>().Object);

            //------------Execute Test---------------------------
            var result = dbServices.DbTest(args, Guid.Empty, Guid.Empty);

            //------------Assert Results-------------------------
            Assert.IsNotNull(result, "DbTest returned null when it was expected to return an error free object.");
            Assert.IsFalse(result.HasErrors, result.ErrorMessage);
        }
Example #4
0
        public void DbServices_DbMethods_InvokesDatabaseBrokerGetServiceMethodsMethod_Done()
        {
            //------------Setup for test--------------------------
            var dbSource        = SqlServerTests.CreateDev2TestingDbSource();
            var args            = JsonConvert.SerializeObject(dbSource);
            var resourceCatalog = new Mock <IResourceCatalog>();

            resourceCatalog.Setup(catalog => catalog.GetResource <DbSource>(It.IsAny <Guid>(), It.IsAny <Guid>())).Returns(dbSource);
            var outputDescription = new Mock <IOutputDescription>();

            outputDescription.Setup(d => d.DataSourceShapes).Returns(new List <IDataSourceShape> {
                new DataSourceShape()
            });

            var dbBroker = new Mock <SqlDatabaseBroker>();

            dbBroker.Setup(b => b.GetServiceMethods(It.IsAny <DbSource>())).Verifiable();

            var dbServices = new TestDbServices(resourceCatalog.Object, dbBroker.Object);

            //------------Execute Test---------------------------
            var result = dbServices.DbMethods(args, Guid.Empty, Guid.Empty);

            //------------Assert Results-------------------------
            dbBroker.Verify(b => b.GetServiceMethods(It.IsAny <DbSource>()));

            Assert.IsNotNull(result);
        }
Example #5
0
        public void DbServices_TestService_InvokesDatabaseBrokerTestServiceMethod_Done()
        {
            //------------Setup for test--------------------------
            var dbService = new DbService
            {
                Recordset = new Recordset(),
                Method    = new ServiceMethod(),
                Source    = SqlServerTests.CreateDev2TestingDbSource()
            };
            var args = JsonConvert.SerializeObject(dbService);

            var outputDescription = new Mock <IOutputDescription>();

            outputDescription.Setup(d => d.DataSourceShapes).Returns(new List <IDataSourceShape> {
                new DataSourceShape()
            });

            var dbBroker = new Mock <SqlDatabaseBroker>();

            dbBroker.Setup(b => b.TestService(It.IsAny <DbService>())).Returns(outputDescription.Object).Verifiable();

            var dbServices = new TestDbServices(dbBroker.Object);

            //------------Execute Test---------------------------
            var result = dbServices.DbTest(args, Guid.Empty, Guid.Empty);

            //------------Assert Results-------------------------
            dbBroker.Verify(b => b.TestService(It.IsAny <DbService>()));

            Assert.IsNotNull(result);
        }
Example #6
0
        public void DbServices_Save_ValidArgs_SavesXmlToDisk()
        {
            var svc           = CreateDev2TestingDbService();
            var args          = svc.ToString();
            var workspaceID   = Guid.NewGuid();
            var workspacePath = EnvironmentVariables.GetWorkspacePath(workspaceID);
            var path          = workspacePath;
            var fileName      = String.Format("{0}\\{1}.xml", path, svc.ResourcePath);

            try
            {
                var services = new TestDbServices();

                //------------Execute Test---------------------------
                services.Save(args, workspaceID, Guid.Empty);

                //Assert Saves Xml To Disk
                var exists = File.Exists(fileName);
                Assert.IsTrue(exists);
            }
            finally
            {
                if (Directory.Exists(workspacePath))
                {
                    DirectoryHelper.CleanUp(workspacePath);
                }
            }
        }
Example #7
0
        public void DbServices_TestService_InvalidArgs_RecordsetWithError()
        {
            var services = new TestDbServices();

            //------------Execute Test---------------------------
            var result = services.DbTest("xxx", Guid.Empty, Guid.Empty);

            // Assert Recordset With Error
            Assert.IsTrue(result.HasErrors);
        }
Example #8
0
        public void DBServices_DBMethods_Null_ReturnEmptyList()
        {
            var services = new TestDbServices();

            //------------Execute Test---------------------------
            var result = services.DbMethods(null, Guid.Empty, Guid.Empty);

            // Assert Empty List
            Assert.AreEqual(0, result.Count);
        }
Example #9
0
        public void DBServices_DBMethods_InvalidArgs_ErrorList()
        {
            var services = new TestDbServices();

            //------------Execute Test---------------------------
            var result = services.DbMethods("xxxx", Guid.Empty, Guid.Empty);

            // Assert Error List
            Assert.AreEqual(1, result.Count);
            Assert.IsTrue(result[0].Name.StartsWith("Error"), "Invalid args did not return error result");
        }
Example #10
0
        public void DbServices_Save_InvalidArgs_ReturnsErrorValidationResult()
        {
            var services = new TestDbServices();

            //------------Execute Test---------------------------
            var result = services.Save("xxxxx", Guid.Empty, Guid.Empty);

            //Assert Returns Error Validation Result
            var validationResult = JsonConvert.DeserializeObject <ValidationResult>(result);

            Assert.IsFalse(validationResult.IsValid);
        }
Example #11
0
        public void DBServices_DbMethods_ValidArgs_ReturnsList()
        {
            var source          = SqlServerTests.CreateDev2TestingDbSource();
            var args            = source.ToString();
            var workspaceID     = Guid.NewGuid();
            var resourceCatalog = new Mock <IResourceCatalog>();

            resourceCatalog.Setup(catalog => catalog.GetResource <DbSource>(It.IsAny <Guid>(), It.IsAny <Guid>())).Returns(source);
            EnvironmentVariables.GetWorkspacePath(workspaceID);

            var services = new TestDbServices(resourceCatalog.Object);

            //------------Execute Test---------------------------
            var result = services.DbMethods(args, workspaceID, Guid.Empty);

            // Assert Returns Valid List
            Assert.IsTrue(result.Count >= 25, "DbMethods does not return a list");
        }
Example #12
0
        public void DbServices_TestService_ValidArgsAndValidRecordsetName_UpdatesRecordsetNameToServiceMethodName()
        {
            var service = CreateDev2TestingDbService();

            service.Recordset.Name = "MyCities";
            var args        = service.ToString();
            var workspaceID = Guid.NewGuid();

            Mock <IResourceCatalog> mockedResourceCatelog = new Mock <IResourceCatalog>();

            mockedResourceCatelog.Setup(a => a.GetResource <DbSource>(workspaceID, service.Source.ResourceID)).Returns(service.Source as DbSource);

            var services = new TestDbServices(mockedResourceCatelog.Object, new Mock <IAuthorizationService>().Object);

            //------------Execute Test---------------------------
            var result = services.DbTest(args, workspaceID, Guid.Empty);

            //Assert Updates Recordset Name To Service Method Name
            Assert.AreEqual(service.Recordset.Name, result.Name, "Recordset name is defaulting to service method name when not null");
            Assert.IsFalse(result.HasErrors, "Valid DB service returned error on test");
        }
Example #13
0
        public void DBServices_Get_ValidArgs_ReturnsService()
        {
            var workspaceID   = Guid.NewGuid();
            var workspacePath = EnvironmentVariables.GetWorkspacePath(workspaceID);

            try
            {
                //------------Setup for test--------------------------
                var svc     = CreateDev2TestingDbService();
                var getArgs = string.Format("{{\"resourceID\":\"{0}\",\"resourceType\":\"{1}\"}}", svc.ResourceID, ResourceType.DbService);

                var resourceCatalog = new Mock <IResourceCatalog>();
                resourceCatalog.Setup(c => c.GetResourceContents(workspaceID, svc.ResourceID))
                .Returns((Guid wsID, Guid resourceID) => svc.ToXml().ToStringBuilder())
                .Verifiable();

                var services = new TestDbServices(resourceCatalog.Object);

                //------------Execute Test---------------------------
                var getResult = services.Get(getArgs, workspaceID, Guid.Empty);

                //------------Assert Results-------------------------
                resourceCatalog.Verify(c => c.GetResourceContents(workspaceID, svc.ResourceID));

                Assert.AreEqual(svc.ResourceID, getResult.ResourceID);
                Assert.AreEqual(svc.ResourceName, getResult.ResourceName);
                Assert.AreEqual(svc.ResourcePath, getResult.ResourcePath);
                Assert.AreEqual(svc.ResourceType, getResult.ResourceType);
            }
            finally
            {
                if (Directory.Exists(workspacePath))
                {
                    DirectoryHelper.CleanUp(workspacePath);
                }
            }
        }