Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
lwm1986
roslyn
提交
b31d8030
R
roslyn
项目概览
lwm1986
/
roslyn
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
roslyn
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
b31d8030
编写于
5月 16, 2016
作者:
A
Artur Spychaj
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #11072 from drognanar/integrate
Update integration test framework
上级
1b1296b0
333c2e81
变更
8
隐藏空白更改
内联
并排
Showing
8 changed file
with
50 addition
and
16 deletion
+50
-16
build/Targets/GenerateInternalsVisibleTo.targets
build/Targets/GenerateInternalsVisibleTo.targets
+1
-1
build/Targets/VSL.Imports.targets
build/Targets/VSL.Imports.targets
+2
-1
src/EditorFeatures/Test2/EditorServicesTest2.vbproj
src/EditorFeatures/Test2/EditorServicesTest2.vbproj
+1
-1
src/VisualStudio/TestUtilities/Remoting/RemotingHelper.cs
src/VisualStudio/TestUtilities/Remoting/RemotingHelper.cs
+4
-2
src/VisualStudio/TestUtilities/VisualStudioTestUtilities.csproj
...sualStudio/TestUtilities/VisualStudioTestUtilities.csproj
+2
-1
src/VisualStudio/TestUtilities/Window/SolutionExplorer.cs
src/VisualStudio/TestUtilities/Window/SolutionExplorer.cs
+15
-0
src/VisualStudio/TestUtilities/Workspace/Project.cs
src/VisualStudio/TestUtilities/Workspace/Project.cs
+3
-1
src/VisualStudio/TestUtilities/Workspace/Solution.cs
src/VisualStudio/TestUtilities/Workspace/Solution.cs
+22
-9
未找到文件。
build/Targets/GenerateInternalsVisibleTo.targets
浏览文件 @
b31d8030
...
...
@@ -26,7 +26,7 @@
</ItemDefinitionGroup>
<PropertyGroup Condition="'$(PublicKey)' != '' and '$(SignAssembly)' == 'True'">
<InternalsVisibleToSuffix>, PublicKey=$(PublicKey)</InternalsVisibleToSuffix>
<InternalsVisibleToSuffix>, PublicKey=$(
Roslyn
PublicKey)</InternalsVisibleToSuffix>
<InternalsVisibleToTestSuffix>, PublicKey=$(RoslynInternalKey)</InternalsVisibleToTestSuffix>
</PropertyGroup>
...
...
build/Targets/VSL.Imports.targets
浏览文件 @
b31d8030
...
...
@@ -12,6 +12,7 @@
<CodeAnalysisRuleSet Condition="'$(CodeAnalysisRuleSet)' == '' AND '$(AnalyzerProject)' == 'true'">$(VSLToolsPath)\Rulesets\AnalyzerProjectRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRuleSet Condition="'$(CodeAnalysisRuleSet)' == ''">$(VSLToolsPath)\Rulesets\Roslyn.ruleset</CodeAnalysisRuleSet>
<RoslynPublicKey>0024000004800000940000000602000000240000525341310004000001000100b5fc90e7027f67871e773a8fde8938c81dd402ba65b9201d60593e96c492651e889cc13f1415ebb53fac1131ae0bd333c5ee6021672d9718ea31a8aebd0da0072f25d87dba6fc90ffd598ed4da35e44c398c454307e8e33b8426143daec9f596836f97c8f74750e5975c64e2189f45def46b2a2b1247adc3652bf5c308055da9</RoslynPublicKey>
<RoslynInternalKey>002400000480000094000000060200000024000052534131000400000100010055e0217eb635f69281051f9a823e0c7edd90f28063eb6c7a742a19b4f6139778ee0af438f47aed3b6e9f99838aa8dba689c7a71ddb860c96d923830b57bbd5cd6119406ddb9b002cf1c723bf272d6acbb7129e9d6dd5a5309c94e0ff4b2c884d45a55f475cd7dba59198086f61f5a8c8b5e601c0edbf269733f6f578fc8579c2</RoslynInternalKey>
</PropertyGroup>
...
...
@@ -43,7 +44,7 @@
<PropertyGroup>
<AssemblyOriginatorKeyFile>$(VSLToolsPath)\Strong Name Keys\35MSSharedLib1024.snk</AssemblyOriginatorKeyFile>
<PublicKey>
0024000004800000940000000602000000240000525341310004000001000100b5fc90e7027f67871e773a8fde8938c81dd402ba65b9201d60593e96c492651e889cc13f1415ebb53fac1131ae0bd333c5ee6021672d9718ea31a8aebd0da0072f25d87dba6fc90ffd598ed4da35e44c398c454307e8e33b8426143daec9f596836f97c8f74750e5975c64e2189f45def46b2a2b1247adc3652bf5c308055da9
</PublicKey>
<PublicKey>
$(RoslynPublicKey)
</PublicKey>
<PublicKeyToken>31BF3856AD364E35</PublicKeyToken>
</PropertyGroup>
</When>
...
...
src/EditorFeatures/Test2/EditorServicesTest2.vbproj
浏览文件 @
b31d8030
...
...
@@ -126,7 +126,7 @@
<Reference
Include=
"WindowsBase"
/>
</ItemGroup>
<ItemGroup>
<InternalsVisibleTo
Include=
"Roslyn.VisualStudio.Services.UnitTests"
/>
<InternalsVisibleTo
Test
Include=
"Roslyn.VisualStudio.Services.UnitTests"
/>
</ItemGroup>
<ItemGroup>
<Import
Include=
"Microsoft.CodeAnalysis.Editor"
/>
...
...
src/VisualStudio/TestUtilities/Remoting/RemotingHelper.cs
浏览文件 @
b31d8030
...
...
@@ -52,6 +52,8 @@ public static string ActiveTextViewContents
}
}
public
static
IWpfTextViewMargin
GetTextViewMargin
(
string
marginName
)
=>
InvokeOnUIThread
(()
=>
ActiveTextViewHost
.
GetTextViewMargin
(
marginName
));
public
static
ReadOnlyCollection
<
ICompletionSession
>
ActiveTextViewCompletionSessions
=>
CompletionBroker
.
GetSessions
(
ActiveTextView
);
public
static
IComponentModel
ComponentModel
=>
GetGlobalService
<
IComponentModel
>(
typeof
(
SComponentModel
));
...
...
@@ -155,9 +157,9 @@ public static void CleanupWorkspace()
private
static
T
GetGlobalService
<
T
>(
Type
serviceType
)
=>
InvokeOnUIThread
(()
=>
(
T
)(
GlobalServiceProvider
.
GetService
(
serviceType
)));
p
rivate
static
void
InvokeOnUIThread
(
Action
action
)
=>
CurrentApplicationDispatcher
.
Invoke
(
action
);
p
ublic
static
void
InvokeOnUIThread
(
Action
action
)
=>
CurrentApplicationDispatcher
.
Invoke
(
action
);
p
rivate
static
T
InvokeOnUIThread
<
T
>(
Func
<
T
>
action
)
=>
CurrentApplicationDispatcher
.
Invoke
(
action
);
p
ublic
static
T
InvokeOnUIThread
<
T
>(
Func
<
T
>
action
)
=>
CurrentApplicationDispatcher
.
Invoke
(
action
);
private
static
void
LoadRoslynPackage
()
{
...
...
src/VisualStudio/TestUtilities/VisualStudioTestUtilities.csproj
浏览文件 @
b31d8030
...
...
@@ -49,6 +49,7 @@
<Compile
Include=
"Workspace\Workspace.cs"
/>
</ItemGroup>
<ItemGroup>
<InternalsVisibleTo
Include=
"Microsoft.CodeAnalysis.TestImpact.VisualStudio.IntegrationTests"
/>
<InternalsVisibleToTest
Include=
"Roslyn.VisualStudio.Test.Setup"
/>
</ItemGroup>
<ItemGroup>
...
...
@@ -128,4 +129,4 @@
</ProjectReference>
</ItemGroup>
<Import
Project=
"..\..\..\build\Targets\VSL.Imports.targets"
/>
</Project>
\ No newline at end of file
</Project>
src/VisualStudio/TestUtilities/Window/SolutionExplorer.cs
浏览文件 @
b31d8030
...
...
@@ -39,6 +39,21 @@ public Solution CreateSolution(string solutionName, bool saveExistingSolutionIfE
return
_solution
;
}
public
Solution
OpenSolution
(
string
path
,
bool
saveExistingSolutionIfExists
=
false
)
{
var
dteSolution
=
IntegrationHelper
.
RetryRpcCall
(()
=>
_visualStudio
.
Dte
.
Solution
);
if
(
IntegrationHelper
.
RetryRpcCall
(()
=>
dteSolution
.
IsOpen
))
{
CloseSolution
(
saveExistingSolutionIfExists
);
}
IntegrationHelper
.
RetryRpcCall
(()
=>
dteSolution
.
Open
(
path
));
_solution
=
new
Solution
((
Solution2
)(
dteSolution
),
path
);
return
_solution
;
}
public
void
CloseSolution
(
bool
saveFirst
=
false
)
=>
IntegrationHelper
.
RetryRpcCall
(()
=>
_visualStudio
.
Dte
.
Solution
.
Close
(
saveFirst
));
}
}
src/VisualStudio/TestUtilities/Workspace/Project.cs
浏览文件 @
b31d8030
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using
System
;
using
System.Threading.Tasks
;
using
DteProject
=
EnvDTE
.
Project
;
namespace
Roslyn.VisualStudio.Test.Utilities
...
...
@@ -35,5 +35,7 @@ internal Project(DteProject dteProject, Solution solution, ProjectLanguage langu
public
ProjectLanguage
Language
=>
_language
;
public
Solution
Solution
=>
_solution
;
public
Task
OpenFileAsync
(
string
fileName
)
=>
DteProject
.
DTE
.
ExecuteCommandAsync
(
"File.OpenFile"
,
fileName
);
}
}
src/VisualStudio/TestUtilities/Workspace/Solution.cs
浏览文件 @
b31d8030
...
...
@@ -68,20 +68,33 @@ public Project AddProject(string projectName, ProjectTemplate projectTemplate, P
if
(
dteProject
==
null
)
{
var
dteSolutionProjects
=
IntegrationHelper
.
RetryRpcCall
(()
=>
_dteSolution
.
Projects
);
dteProject
=
GetDteProject
(
projectName
);
}
foreach
(
DteProject
project
in
dteSolutionProjects
)
{
var
dteProjectName
=
IntegrationHelper
.
RetryRpcCall
(()
=>
project
.
Name
);
return
new
Project
(
dteProject
,
this
,
projectLanguage
);
}
public
Project
GetProject
(
string
projectName
,
ProjectLanguage
projectLanguage
)
{
DteProject
dteProject
=
GetDteProject
(
projectName
);
return
new
Project
(
dteProject
,
this
,
projectLanguage
);
}
private
DteProject
GetDteProject
(
string
projectName
)
{
var
dteSolutionProjects
=
IntegrationHelper
.
RetryRpcCall
(()
=>
_dteSolution
.
Projects
);
if
(
dteProjectName
==
projectName
)
{
dteProject
=
project
;
}
foreach
(
DteProject
project
in
dteSolutionProjects
)
{
var
dteProjectName
=
IntegrationHelper
.
RetryRpcCall
(()
=>
project
.
Name
);
if
(
dteProjectName
==
projectName
)
{
return
project
;
}
}
return
new
Project
(
dteProject
,
this
,
projectLanguage
);
throw
new
Exception
(
$"The specified project could not be found. Project name: '
{
projectName
}
'"
);
}
public
void
Save
()
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录