public Get ( string resourceId, System.Guid workspaceId, System.Guid dataListId ) : |
||
resourceId | string | |
workspaceId | System.Guid | |
dataListId | System.Guid | |
return |
public void WebSourcesGetWithValidArgsExpectedReturnsSource() { var expected = CreateWebSource(); var saveArgs = expected.ToString(); var workspaceID = Guid.NewGuid(); var workspacePath = EnvironmentVariables.GetWorkspacePath(workspaceID); try { var handler = new WebSources(); handler.Save(saveArgs, workspaceID, Guid.Empty); var actual = handler.Get(expected.ResourceID.ToString(), workspaceID, Guid.Empty); VerifySource(actual, expected); } finally { try { if(Directory.Exists(workspacePath)) { DirectoryHelper.CleanUp(workspacePath); } } // ReSharper disable EmptyGeneralCatchClause catch(Exception) // ReSharper restore EmptyGeneralCatchClause { } } }
public void WebSourcesGetWithInvalidArgsExpectedReturnsNewSource() { var handler = new WebSources(); var result = handler.Get("xxxxx", Guid.Empty, Guid.Empty); Assert.IsNotNull(result); Assert.AreEqual(Guid.Empty, result.ResourceID); }