Dev2.Tests.Runtime.ServiceModel.EmailSourcesTests.EmailSourcesGetWithValidArgsExpectedReturnsSource C# (CSharp) Method

EmailSourcesGetWithValidArgsExpectedReturnsSource() private method

private EmailSourcesGetWithValidArgsExpectedReturnsSource ( ) : void
return void
        public void EmailSourcesGetWithValidArgsExpectedReturnsSource()
        {
            var expected = CreateYahooSource();
            var saveArgs = expected.ToString();

            var workspaceID = Guid.NewGuid();
            var workspacePath = EnvironmentVariables.GetWorkspacePath(workspaceID);
            try
            {
                var handler = new EmailSources();
                handler.Save(saveArgs, workspaceID, Guid.Empty);

                var actual = handler.Get(expected.ResourceID.ToString(), workspaceID, Guid.Empty);

                VerifySource(actual, expected);
            }
            finally
            {
                if(Directory.Exists(workspacePath))
                {
                    DirectoryHelper.CleanUp(workspacePath);
                }
            }
        }