Initial code
This commit is contained in:
Коммит
571467abdc
|
@ -0,0 +1,208 @@
|
|||
## Ignore Visual Studio temporary files, build results, and
|
||||
## files generated by popular Visual Studio add-ons.
|
||||
|
||||
# User-specific files
|
||||
*.suo
|
||||
*.user
|
||||
*.userosscache
|
||||
*.sln.docstates
|
||||
|
||||
# User-specific files (MonoDevelop/Xamarin Studio)
|
||||
*.userprefs
|
||||
|
||||
# Build results
|
||||
[Dd]ebug/
|
||||
[Dd]ebugPublic/
|
||||
[Rr]elease/
|
||||
[Rr]eleases/
|
||||
x64/
|
||||
x86/
|
||||
build/
|
||||
bld/
|
||||
[Bb]in/
|
||||
[Oo]bj/
|
||||
|
||||
# Visual Studo 2015 cache/options directory
|
||||
.vs/
|
||||
|
||||
# MSTest test Results
|
||||
[Tt]est[Rr]esult*/
|
||||
[Bb]uild[Ll]og.*
|
||||
|
||||
# NUNIT
|
||||
*.VisualState.xml
|
||||
TestResult.xml
|
||||
|
||||
# Build Results of an ATL Project
|
||||
[Dd]ebugPS/
|
||||
[Rr]eleasePS/
|
||||
dlldata.c
|
||||
|
||||
# DNX
|
||||
project.lock.json
|
||||
artifacts/
|
||||
|
||||
*_i.c
|
||||
*_p.c
|
||||
*_i.h
|
||||
*.ilk
|
||||
*.meta
|
||||
*.obj
|
||||
*.pch
|
||||
*.pdb
|
||||
*.pgc
|
||||
*.pgd
|
||||
*.rsp
|
||||
*.sbr
|
||||
*.tlb
|
||||
*.tli
|
||||
*.tlh
|
||||
*.tmp
|
||||
*.tmp_proj
|
||||
*.log
|
||||
*.vspscc
|
||||
*.vssscc
|
||||
.builds
|
||||
*.pidb
|
||||
*.svclog
|
||||
*.scc
|
||||
|
||||
# Chutzpah Test files
|
||||
_Chutzpah*
|
||||
|
||||
# Visual C++ cache files
|
||||
ipch/
|
||||
*.aps
|
||||
*.ncb
|
||||
*.opensdf
|
||||
*.sdf
|
||||
*.cachefile
|
||||
|
||||
# Visual Studio profiler
|
||||
*.psess
|
||||
*.vsp
|
||||
*.vspx
|
||||
|
||||
# TFS 2012 Local Workspace
|
||||
$tf/
|
||||
|
||||
# Guidance Automation Toolkit
|
||||
*.gpState
|
||||
|
||||
# ReSharper is a .NET coding add-in
|
||||
_ReSharper*/
|
||||
*.[Rr]e[Ss]harper
|
||||
*.DotSettings.user
|
||||
|
||||
# JustCode is a .NET coding add-in
|
||||
.JustCode
|
||||
|
||||
# TeamCity is a build add-in
|
||||
_TeamCity*
|
||||
|
||||
# DotCover is a Code Coverage Tool
|
||||
*.dotCover
|
||||
|
||||
# NCrunch
|
||||
_NCrunch_*
|
||||
.*crunch*.local.xml
|
||||
|
||||
# MightyMoose
|
||||
*.mm.*
|
||||
AutoTest.Net/
|
||||
|
||||
# Web workbench (sass)
|
||||
.sass-cache/
|
||||
|
||||
# Installshield output folder
|
||||
[Ee]xpress/
|
||||
|
||||
# DocProject is a documentation generator add-in
|
||||
DocProject/buildhelp/
|
||||
DocProject/Help/*.HxT
|
||||
DocProject/Help/*.HxC
|
||||
DocProject/Help/*.hhc
|
||||
DocProject/Help/*.hhk
|
||||
DocProject/Help/*.hhp
|
||||
DocProject/Help/Html2
|
||||
DocProject/Help/html
|
||||
|
||||
# Click-Once directory
|
||||
publish/
|
||||
|
||||
# Publish Web Output
|
||||
*.[Pp]ublish.xml
|
||||
*.azurePubxml
|
||||
# TODO: Comment the next line if you want to checkin your web deploy settings
|
||||
# but database connection strings (with potential passwords) will be unencrypted
|
||||
*.pubxml
|
||||
*.publishproj
|
||||
|
||||
# NuGet Packages
|
||||
*.nupkg
|
||||
# The packages folder can be ignored because of Package Restore
|
||||
**/packages/*
|
||||
packages/*
|
||||
!packages/build/
|
||||
# except build/, which is used as an MSBuild target.
|
||||
!**/packages/build/
|
||||
# Uncomment if necessary however generally it will be regenerated when needed
|
||||
#!**/packages/repositories.config
|
||||
|
||||
# Windows Azure Build Output
|
||||
csx/
|
||||
*.build.csdef
|
||||
|
||||
# Windows Store app package directory
|
||||
AppPackages/
|
||||
|
||||
# Visual Studio cache files
|
||||
# files ending in .cache can be ignored
|
||||
*.[Cc]ache
|
||||
# but keep track of directories ending in .cache
|
||||
!*.[Cc]ache/
|
||||
|
||||
# Others
|
||||
ClientBin/
|
||||
[Ss]tyle[Cc]op.*
|
||||
~$*
|
||||
*~
|
||||
*.dbmdl
|
||||
*.dbproj.schemaview
|
||||
*.pfx
|
||||
*.publishsettings
|
||||
node_modules/
|
||||
bower_components/
|
||||
orleans.codegen.cs
|
||||
|
||||
# RIA/Silverlight projects
|
||||
Generated_Code/
|
||||
|
||||
# Backup & report files from converting an old project file
|
||||
# to a newer Visual Studio version. Backup files are not needed,
|
||||
# because we have git ;-)
|
||||
_UpgradeReport_Files/
|
||||
Backup*/
|
||||
UpgradeLog*.XML
|
||||
UpgradeLog*.htm
|
||||
|
||||
# SQL Server files
|
||||
*.mdf
|
||||
*.ldf
|
||||
|
||||
# Business Intelligence projects
|
||||
*.rdl.data
|
||||
*.bim.layout
|
||||
*.bim_*.settings
|
||||
|
||||
# Microsoft Fakes
|
||||
FakesAssemblies/
|
||||
|
||||
# Node.js Tools for Visual Studio
|
||||
.ntvs_analysis.dat
|
||||
|
||||
# Visual Studio 6 build log
|
||||
*.plg
|
||||
|
||||
# Visual Studio 6 workspace options file
|
||||
*.opt
|
|
@ -0,0 +1,73 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProjectGuid>{9635AFF9-7554-434D-AA63-556313342E5A}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>Samples.Extensions.NUnit</RootNamespace>
|
||||
<AssemblyName>Samples.Extensions.NUnit</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="envdte, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<EmbedInteropTypes>True</EmbedInteropTypes>
|
||||
</Reference>
|
||||
<Reference Include="envdte80, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<EmbedInteropTypes>True</EmbedInteropTypes>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.VisualStudio.TestPlatform.TestGeneration">
|
||||
<HintPath>..\..\..\..\..\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\CommonExtensions\Microsoft\TestGeneration\Microsoft.VisualStudio.TestPlatform.TestGeneration.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.ComponentModel.Composition" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Net.Http" />
|
||||
<Reference Include="System.Xml" />
|
||||
<Reference Include="VSLangProj, Version=7.0.3300.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<EmbedInteropTypes>True</EmbedInteropTypes>
|
||||
</Reference>
|
||||
<Reference Include="VSLangProj80, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<EmbedInteropTypes>True</EmbedInteropTypes>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="NUnitFrameworkProvider.cs" />
|
||||
<Compile Include="NUnitSolutionManager.cs" />
|
||||
<Compile Include="NUnitUnitTestClassManager.cs" />
|
||||
<Compile Include="NUnitUnitTestProjectManager.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
</Target>
|
||||
<Target Name="AfterBuild">
|
||||
</Target>
|
||||
-->
|
||||
</Project>
|
|
@ -0,0 +1,54 @@
|
|||
//---------------------------------------------------------------------
|
||||
// <copyright file="NUnitFrameworkProvider.cs" company="Microsoft">
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY
|
||||
// OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT
|
||||
// LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR
|
||||
// FITNESS FOR A PARTICULAR PURPOSE.
|
||||
// </copyright>
|
||||
// <summary>The NUnitFrameworkProvider type.</summary>
|
||||
//---------------------------------------------------------------------
|
||||
|
||||
namespace Microsoft.VisualStudio.TestPlatform.TestGeneration.Extensions.NUnit
|
||||
{
|
||||
using System;
|
||||
using System.ComponentModel.Composition;
|
||||
using Microsoft.VisualStudio.TestPlatform.TestGeneration.Data;
|
||||
using Microsoft.VisualStudio.TestPlatform.TestGeneration.Model;
|
||||
|
||||
/// <summary>
|
||||
/// The provider for the NUnit unit test framework.
|
||||
/// </summary>
|
||||
[Export(typeof(IFrameworkProvider))]
|
||||
public class NUnitFrameworkProvider : FrameworkProviderBase
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="NUnitFrameworkProvider"/> class.
|
||||
/// </summary>
|
||||
/// <param name="serviceProvider">The service provider to use to get the interfaces required.</param>
|
||||
/// <param name="configurationSettings">The configuration settings object to be used to determine how the test method is generated.</param>
|
||||
/// <param name="naming">The naming object used to decide how projects, classes and methods are named and created.</param>
|
||||
/// <param name="directory">The directory object to use for directory operations.</param>
|
||||
[ImportingConstructor]
|
||||
public NUnitFrameworkProvider(IServiceProvider serviceProvider, IConfigurationSettings configurationSettings, INaming naming, IDirectory directory)
|
||||
: base(new NUnitSolutionManager(serviceProvider, naming, directory), new NUnitUnitTestProjectManager(serviceProvider, naming), new NUnitUnitTestClassManager(configurationSettings, naming))
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the name of the provider.
|
||||
/// </summary>
|
||||
public override string Name
|
||||
{
|
||||
get { return "NUnit"; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the name of the assembly.
|
||||
/// </summary>
|
||||
public override string AssemblyName
|
||||
{
|
||||
get { return "nunit.framework"; }
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,75 @@
|
|||
//---------------------------------------------------------------------
|
||||
// <copyright file="NUnitSolutionManager.cs" company="Microsoft">
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY
|
||||
// OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT
|
||||
// LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR
|
||||
// FITNESS FOR A PARTICULAR PURPOSE.
|
||||
// </copyright>
|
||||
// <summary>The NUnitSolutionManager type.</summary>
|
||||
//---------------------------------------------------------------------
|
||||
|
||||
namespace Microsoft.VisualStudio.TestPlatform.TestGeneration.Extensions.NUnit
|
||||
{
|
||||
using System;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
using EnvDTE;
|
||||
|
||||
using EnvDTE80;
|
||||
|
||||
using Microsoft.VisualStudio.TestPlatform.TestGeneration;
|
||||
using Microsoft.VisualStudio.TestPlatform.TestGeneration.Data;
|
||||
using Microsoft.VisualStudio.TestPlatform.TestGeneration.Logging;
|
||||
using Microsoft.VisualStudio.TestPlatform.TestGeneration.Model;
|
||||
|
||||
using VSLangProj;
|
||||
|
||||
using VSLangProj80;
|
||||
|
||||
/// <summary>
|
||||
/// A solution manager for NUnit unit tests.
|
||||
/// </summary>
|
||||
public class NUnitSolutionManager : SolutionManagerBase
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="NUnitSolutionManager"/> class.
|
||||
/// </summary>
|
||||
/// <param name="serviceProvider">The service provider to use to get the interfaces required.</param>
|
||||
/// <param name="naming">The naming object used to decide how projects, classes and methods are named and created.</param>
|
||||
/// <param name="directory">The directory object to use for directory operations.</param>
|
||||
public NUnitSolutionManager(IServiceProvider serviceProvider, INaming naming, IDirectory directory)
|
||||
: base(serviceProvider, naming, directory)
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Performs any preparatory tasks that have to be done after a new unit test project has been created.
|
||||
/// </summary>
|
||||
/// <param name="unitTestProject">The <see cref="Project"/> of the unit test project that has just been created.</param>
|
||||
/// <param name="sourceMethod">The <see cref="CodeFunction2"/> of the source method that is to be unit tested.</param>
|
||||
protected override void OnUnitTestProjectCreated(Project unitTestProject, CodeFunction2 sourceMethod)
|
||||
{
|
||||
if (unitTestProject == null)
|
||||
{
|
||||
throw new ArgumentNullException("unitTestProject");
|
||||
}
|
||||
|
||||
TraceLogger.LogInfo("NUnitSolutionManager.OnUnitTestProjectCreated: Adding reference to NUnit assemblies through nuget.");
|
||||
|
||||
base.OnUnitTestProjectCreated(unitTestProject, sourceMethod);
|
||||
this.EnsureNuGetReference(unitTestProject, "NUnit", "2.6.4");
|
||||
|
||||
VSProject2 vsp = unitTestProject.Object as VSProject2;
|
||||
if (vsp != null)
|
||||
{
|
||||
Reference reference = vsp.References.Find(GlobalConstants.MSTestAssemblyName);
|
||||
if (reference != null)
|
||||
{
|
||||
TraceLogger.LogInfo("NUnitSolutionManager.OnUnitTestProjectCreated: Removing reference to {0}", reference.Name);
|
||||
reference.Remove();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,56 @@
|
|||
//---------------------------------------------------------------------
|
||||
// <copyright file="NUnitUnitTestClassManager.cs" company="Microsoft">
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY
|
||||
// OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT
|
||||
// LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR
|
||||
// FITNESS FOR A PARTICULAR PURPOSE.
|
||||
// </copyright>
|
||||
// <summary>The NUnitUnitTestClassManager type.</summary>
|
||||
//---------------------------------------------------------------------
|
||||
|
||||
namespace Microsoft.VisualStudio.TestPlatform.TestGeneration.Extensions.NUnit
|
||||
{
|
||||
using Microsoft.VisualStudio.TestPlatform.TestGeneration.Data;
|
||||
using Microsoft.VisualStudio.TestPlatform.TestGeneration.Model;
|
||||
|
||||
/// <summary>
|
||||
/// A unit test class for NUnit unit tests.
|
||||
/// </summary>
|
||||
public class NUnitUnitTestClassManager : UnitTestClassManagerBase
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="NUnitUnitTestClassManager"/> class.
|
||||
/// </summary>
|
||||
/// <param name="configurationSettings">The configuration settings object to be used to determine how the test method is generated.</param>
|
||||
/// <param name="naming">The object to be used to give names to test projects.</param>
|
||||
public NUnitUnitTestClassManager(IConfigurationSettings configurationSettings, INaming naming)
|
||||
: base(configurationSettings, naming)
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The attribute name for marking a class as a test class.
|
||||
/// </summary>
|
||||
public override string TestClassAttribute
|
||||
{
|
||||
get { return "TestFixture"; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The attribute name for marking a method as a test.
|
||||
/// </summary>
|
||||
public override string TestMethodAttribute
|
||||
{
|
||||
get { return "Test"; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The code to force a test failure.
|
||||
/// </summary>
|
||||
public override string AssertionFailure
|
||||
{
|
||||
get { return "Assert.Fail()"; }
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,43 @@
|
|||
//---------------------------------------------------------------------
|
||||
// <copyright file="NUnitUnitTestProjectManager.cs" company="Microsoft">
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY
|
||||
// OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT
|
||||
// LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR
|
||||
// FITNESS FOR A PARTICULAR PURPOSE.
|
||||
// </copyright>
|
||||
// <summary>The NUnitUnitTestProjectManager type.</summary>
|
||||
//---------------------------------------------------------------------
|
||||
|
||||
namespace Microsoft.VisualStudio.TestPlatform.TestGeneration.Extensions.NUnit
|
||||
{
|
||||
using System;
|
||||
using EnvDTE;
|
||||
using Microsoft.VisualStudio.TestPlatform.TestGeneration.Model;
|
||||
|
||||
/// <summary>
|
||||
/// A unit test project for NUnit unit tests.
|
||||
/// </summary>
|
||||
public class NUnitUnitTestProjectManager : UnitTestProjectManagerBase
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="NUnitUnitTestProjectManager"/> class.
|
||||
/// </summary>
|
||||
/// <param name="serviceProvider">The service provider to use to get the interfaces required.</param>
|
||||
/// <param name="naming">The naming object used to decide how projects, classes and methods are named and created.</param>
|
||||
public NUnitUnitTestProjectManager(IServiceProvider serviceProvider, INaming naming)
|
||||
: base(serviceProvider, naming)
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the full namespace that contains the test framework code elements for a given source project.
|
||||
/// </summary>
|
||||
/// <param name="sourceProject">The source project.</param>
|
||||
/// <returns>The full namespace that contains the test framework code elements.</returns>
|
||||
public override string FrameworkNamespace(Project sourceProject)
|
||||
{
|
||||
return "NUnit.Framework";
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,36 @@
|
|||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
[assembly: AssemblyTitle("Samples.Extensions.NUnit")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("Samples.Extensions.NUnit")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2015")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// Setting ComVisible to false makes the types in this assembly not visible
|
||||
// to COM components. If you need to access a type in this assembly from
|
||||
// COM, set the ComVisible attribute to true on that type.
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// The following GUID is for the ID of the typelib if this project is exposed to COM
|
||||
[assembly: Guid("9635aff9-7554-434d-aa63-556313342e5a")]
|
||||
|
||||
// Version information for an assembly consists of the following four values:
|
||||
//
|
||||
// Major Version
|
||||
// Minor Version
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
// You can specify all the values or you can default the Build and Revision Numbers
|
||||
// by using the '*' as shown below:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
|
@ -0,0 +1,66 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProjectGuid>{9B87DC9E-151C-4F94-959F-657BBF72645F}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>NUnit</RootNamespace>
|
||||
<AssemblyName>NUnit</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="Microsoft.ExtendedReflection">
|
||||
<HintPath>..\..\..\..\..\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\Microsoft\Pex\Microsoft.ExtendedReflection.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.ExtendedReflection.Reasoning">
|
||||
<HintPath>..\..\..\..\..\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\Microsoft\Pex\Microsoft.ExtendedReflection.Reasoning.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Pex.Framework">
|
||||
<HintPath>..\..\..\..\..\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\Microsoft\Pex\Microsoft.Pex.Framework.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Net.Http" />
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="NUnitAssertMethodFilter.cs" />
|
||||
<Compile Include="NUnitTestFramework.cs" />
|
||||
<Compile Include="NunitTestFrameworkMetadata.cs" />
|
||||
<Compile Include="NUnitTestFrameworkPackage.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
</Target>
|
||||
<Target Name="AfterBuild">
|
||||
</Target>
|
||||
-->
|
||||
</Project>
|
|
@ -0,0 +1,77 @@
|
|||
namespace Samples.Extensions.NUnit
|
||||
{
|
||||
using Microsoft.ExtendedReflection.Asserts;
|
||||
using Microsoft.ExtendedReflection.Metadata;
|
||||
using Microsoft.ExtendedReflection.Utilities.Safe.Diagnostics;
|
||||
|
||||
/// <summary>
|
||||
/// The n unit assert method filer.
|
||||
/// </summary>
|
||||
internal sealed class NUnitAssertMethodFilter : IAssertMethodFilter
|
||||
{
|
||||
private NUnitAssertMethodFilter() { }
|
||||
public static NUnitAssertMethodFilter Instance
|
||||
= new NUnitAssertMethodFilter();
|
||||
|
||||
public bool IsAssertMethod(MethodDefinition method, out int usefulParameters)
|
||||
{
|
||||
SafeDebug.AssumeNotNull(method, "method");
|
||||
TypeDefinition type;
|
||||
if (method.TryGetDeclaringType(out type))
|
||||
{
|
||||
if (type.SerializableName == NUnitTestFrameworkMetadata.AssertTypeDefinition)
|
||||
{
|
||||
switch (method.ShortName)
|
||||
{
|
||||
case "IsEmpty":
|
||||
case "IsNotEmpty":
|
||||
case "False":
|
||||
case "IsFalse":
|
||||
case "True":
|
||||
case "IsTrue":
|
||||
case "IsAssignableFrom":
|
||||
case "IsNotAssignableFrom":
|
||||
case "IsNull":
|
||||
case "IsNotNull":
|
||||
case "Null":
|
||||
case "NotNull":
|
||||
case "IsNotNullOrEmpty":
|
||||
case "IsNullOrEmpty":
|
||||
case "IsNan":
|
||||
case "IsInstanceOf": //not entirely correct
|
||||
case "IsNotInstanceOf": //not entirely correct
|
||||
usefulParameters = 1;
|
||||
return true;
|
||||
case "AreEqual":
|
||||
case "AssertDoublesAreEqual":
|
||||
case "AreNotEqual":
|
||||
case "Contains":
|
||||
case "AreSame":
|
||||
case "AreNotSame":
|
||||
case "Greater":
|
||||
case "GreaterOrEqual":
|
||||
case "Less":
|
||||
case "LessOrEqual":
|
||||
usefulParameters = 2;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
else if (type.SerializableName == NUnitTestFrameworkMetadata.CollectionAssertTypeDefinition)
|
||||
{
|
||||
switch (method.ShortName)
|
||||
{
|
||||
case "Equals":
|
||||
case "ReferenceEquals":
|
||||
usefulParameters = -1;
|
||||
return false;
|
||||
default:
|
||||
usefulParameters = 0;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
usefulParameters = -1;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,504 @@
|
|||
// --------------------------------------------------------------------------------------------------------------------
|
||||
// <copyright file="NUnitTestFramework.cs" company="Microsoft">
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// </copyright>
|
||||
// <summary>
|
||||
// NUnit test framework
|
||||
// </summary>
|
||||
// --------------------------------------------------------------------------------------------------------------------
|
||||
namespace Samples.Extensions.NUnit
|
||||
{
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Reflection;
|
||||
|
||||
using Microsoft.ExtendedReflection.Asserts;
|
||||
using Microsoft.ExtendedReflection.Collections;
|
||||
using Microsoft.ExtendedReflection.Metadata;
|
||||
using Microsoft.ExtendedReflection.Metadata.Names;
|
||||
using Microsoft.ExtendedReflection.Monitoring;
|
||||
using Microsoft.ExtendedReflection.Utilities;
|
||||
using Microsoft.ExtendedReflection.Utilities.Safe;
|
||||
using Microsoft.ExtendedReflection.Utilities.Safe.Diagnostics;
|
||||
using Microsoft.Pex.Engine.ComponentModel;
|
||||
using Microsoft.Pex.Engine.TestFrameworks;
|
||||
|
||||
/// <summary>
|
||||
/// NUnit test framework
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
sealed class NUnitTestFramework : AttributeBasedTestFrameworkBase
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="NUnitTestFramework"/> class.
|
||||
/// </summary>
|
||||
/// <param name="host">
|
||||
/// </param>
|
||||
public NUnitTestFramework(IPexComponent host)
|
||||
: base(host)
|
||||
{ }
|
||||
|
||||
/// <summary>
|
||||
/// identify of the test framework
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
public override string Name
|
||||
{
|
||||
get { return "NUnit"; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the assembly name of the framework main's assembly. This name is used
|
||||
/// to automatically discover test frameworks, based the assembly references
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
public override ShortAssemblyName AssemblyName
|
||||
{
|
||||
get { return NUnitTestFrameworkMetadata.AssemblyName; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the root namespace.
|
||||
/// </summary>
|
||||
/// <value>The root namespace.</value>
|
||||
public override string RootNamespace
|
||||
{
|
||||
get { return NUnitTestFrameworkMetadata.RootNamespace; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The test framework references.
|
||||
/// </summary>
|
||||
public override ICountable<ShortReferenceAssemblyName> References
|
||||
{
|
||||
get
|
||||
{
|
||||
return Indexable.One(new ShortReferenceAssemblyName(ShortAssemblyName.FromName("Nunit"), "2.6.4", AssemblyReferenceType.NugetReference));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The _directory.
|
||||
/// </summary>
|
||||
private string _directory = null;
|
||||
|
||||
/// <summary>
|
||||
/// Hint on the location of the test framework assembly
|
||||
/// </summary>
|
||||
/// <param name="directory">
|
||||
/// The directory.
|
||||
/// </param>
|
||||
/// <returns>
|
||||
/// The <see cref="bool"/>.
|
||||
/// </returns>
|
||||
public override bool TryGetDirectory(out string directory)
|
||||
{
|
||||
if (this._directory == null)
|
||||
{
|
||||
DirectoryInfo programFiles = new DirectoryInfo(Environment.ExpandEnvironmentVariables("%ProgramFiles%"));
|
||||
DirectoryInfo[] info = programFiles.GetDirectories("NUnit-Net-*", SearchOption.TopDirectoryOnly);
|
||||
if (info == null || info.Length == 0)
|
||||
this._directory = string.Empty;
|
||||
else
|
||||
this._directory = Path.Combine(info[0].FullName, "bin");
|
||||
}
|
||||
|
||||
directory = this._directory;
|
||||
return !SafeString.IsNullOrEmpty(directory);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets a value indicating whether
|
||||
/// partial test classes
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
public override bool SupportsPartialClasses
|
||||
{
|
||||
get { return true; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The supports project bitness.
|
||||
/// </summary>
|
||||
/// <param name="bitness">
|
||||
/// The bitness.
|
||||
/// </param>
|
||||
/// <returns>
|
||||
/// The <see cref="bool"/>.
|
||||
/// </returns>
|
||||
public override bool SupportsProjectBitness(Bitness bitness)
|
||||
{
|
||||
SafeDebug.Assume(bitness != Bitness.Unsupported, "bitness != Bitness.Unsupported");
|
||||
return true;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The _expected exception attribute.
|
||||
/// </summary>
|
||||
[NonSerialized]
|
||||
TypeName _expectedExceptionAttribute;
|
||||
|
||||
/// <summary>
|
||||
/// Gets the ExpectedException attribute.
|
||||
/// </summary>
|
||||
/// <value>The expected exception attribute.</value>
|
||||
public override TypeName ExpectedExceptionAttribute
|
||||
{
|
||||
get
|
||||
{
|
||||
if (this._expectedExceptionAttribute == null)
|
||||
this._expectedExceptionAttribute = NUnitTestFrameworkMetadata.AttributeName("ExpectedException");
|
||||
return this._expectedExceptionAttribute;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Tries the read expected exception.
|
||||
/// </summary>
|
||||
/// <param name="target">
|
||||
/// The method.
|
||||
/// </param>
|
||||
/// <param name="exceptionType">
|
||||
/// Type of the exception.
|
||||
/// </param>
|
||||
/// <returns>
|
||||
/// The <see cref="bool"/>.
|
||||
/// </returns>
|
||||
public override bool TryReadExpectedException(
|
||||
ICustomAttributeProviderEx target,
|
||||
out TypeEx exceptionType)
|
||||
{
|
||||
object attribute = AttributeHelper.GetAttribute(target, this.ExpectedExceptionAttribute);
|
||||
if (attribute != null)
|
||||
{
|
||||
Type attributeType = attribute.GetType();
|
||||
|
||||
// read exception type using reflection.
|
||||
var field = attributeType.GetField("expectedException", BindingFlags.NonPublic | BindingFlags.Instance);
|
||||
if (field != null)
|
||||
{
|
||||
Type t = field.GetValue(attribute) as Type;
|
||||
bool isClass;
|
||||
if (t != null && ReflectionHelper.TryGetIsClass(t, out isClass) && isClass
|
||||
&& !ReflectionHelper.ContainsGenericParameters(t))
|
||||
{
|
||||
exceptionType = MetadataFromReflection.GetType(t);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
exceptionType = null;
|
||||
return false;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Tries to get the assembly set up tear down attribute.
|
||||
/// </summary>
|
||||
/// <param name="assembly">
|
||||
/// The assembly.
|
||||
/// </param>
|
||||
/// <param name="setUp">
|
||||
/// The set up.
|
||||
/// </param>
|
||||
/// <param name="tearDown">
|
||||
/// The tear down.
|
||||
/// </param>
|
||||
/// <returns>
|
||||
/// The <see cref="bool"/>.
|
||||
/// </returns>
|
||||
public override bool TryGetAssemblySetupTeardownMethods(
|
||||
AssemblyEx assembly,
|
||||
out Method setUp,
|
||||
out Method tearDown)
|
||||
{
|
||||
setUp = null;
|
||||
tearDown = null;
|
||||
return false;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets a value indicating whether[fixture set up tear down are instance methods.
|
||||
/// </summary>
|
||||
/// <value>
|
||||
/// <c>true</c> if [fixture set up tear down instance]; otherwise, <c>false</c>.
|
||||
/// </value>
|
||||
public override bool FixtureSetupTeardownInstance
|
||||
{
|
||||
get { return true; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The _fixture attribute.
|
||||
/// </summary>
|
||||
[NonSerialized]
|
||||
TypeName _fixtureAttribute;
|
||||
|
||||
/// <summary>
|
||||
/// Gets the name of the fixture attribute
|
||||
/// </summary>
|
||||
/// <value>The fixture attribute.</value>
|
||||
public override TypeName FixtureAttribute
|
||||
{
|
||||
get
|
||||
{
|
||||
if (this._fixtureAttribute == null)
|
||||
this._fixtureAttribute = NUnitTestFrameworkMetadata.AttributeName("TestFixture");
|
||||
return this._fixtureAttribute;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The _fixture set up attribute.
|
||||
/// </summary>
|
||||
[NonSerialized]
|
||||
TypeName _fixtureSetUpAttribute;
|
||||
|
||||
/// <summary>
|
||||
/// Gets the name of the fixture setup attribute
|
||||
/// </summary>
|
||||
/// <value>The fixture set up attribute.</value>
|
||||
public override TypeName FixtureSetupAttribute
|
||||
{
|
||||
get
|
||||
{
|
||||
if (this._fixtureSetUpAttribute == null)
|
||||
this._fixtureSetUpAttribute = NUnitTestFrameworkMetadata.AttributeName("TestFixtureSetUp");
|
||||
return this._fixtureSetUpAttribute;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The _fixture tear down attribute.
|
||||
/// </summary>
|
||||
[NonSerialized]
|
||||
TypeName _fixtureTearDownAttribute;
|
||||
|
||||
/// <summary>
|
||||
/// Gets the name of the fixture teardown attribute
|
||||
/// </summary>
|
||||
/// <value>The fixture tear down attribute.</value>
|
||||
public override TypeName FixtureTeardownAttribute
|
||||
{
|
||||
get
|
||||
{
|
||||
if (this._fixtureTearDownAttribute == null)
|
||||
this._fixtureTearDownAttribute = NUnitTestFrameworkMetadata.AttributeName("TestFixtureTearDown");
|
||||
return this._fixtureTearDownAttribute;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The _set up attribute.
|
||||
/// </summary>
|
||||
[NonSerialized]
|
||||
TypeName _setUpAttribute;
|
||||
|
||||
/// <summary>
|
||||
/// Gets the name of the test setup attribute.
|
||||
/// </summary>
|
||||
/// <value>The set up attribute.</value>
|
||||
public override TypeName SetupAttribute
|
||||
{
|
||||
get
|
||||
{
|
||||
if (this._setUpAttribute == null)
|
||||
this._setUpAttribute = NUnitTestFrameworkMetadata.AttributeName("SetUp");
|
||||
return this._setUpAttribute;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The _test attribute.
|
||||
/// </summary>
|
||||
[NonSerialized]
|
||||
TypeName _testAttribute;
|
||||
|
||||
/// <summary>
|
||||
/// Gets the name of the test attribute.
|
||||
/// </summary>
|
||||
/// <value>The set up attribute.</value>
|
||||
public override TypeName TestAttribute
|
||||
{
|
||||
get
|
||||
{
|
||||
if (this._testAttribute == null)
|
||||
this._testAttribute = NUnitTestFrameworkMetadata.AttributeName("Test");
|
||||
return this._testAttribute;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The _tear down attribute.
|
||||
/// </summary>
|
||||
[NonSerialized]
|
||||
TypeName _tearDownAttribute;
|
||||
|
||||
/// <summary>
|
||||
/// Gets the name of the test teardown attribute.
|
||||
/// </summary>
|
||||
/// <value>The tear down attribute.</value>
|
||||
public override TypeName TeardownAttribute
|
||||
{
|
||||
get
|
||||
{
|
||||
if (this._tearDownAttribute == null)
|
||||
this._tearDownAttribute = NUnitTestFrameworkMetadata.AttributeName("TearDown");
|
||||
return this._tearDownAttribute;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The _ignore attribute.
|
||||
/// </summary>
|
||||
[NonSerialized]
|
||||
TypeName _ignoreAttribute;
|
||||
|
||||
/// <summary>
|
||||
/// Gets the ignore attribute.
|
||||
/// </summary>
|
||||
/// <value>The ignore attribute.</value>
|
||||
public override TypeName IgnoreAttribute
|
||||
{
|
||||
get
|
||||
{
|
||||
if (this._ignoreAttribute == null)
|
||||
this._ignoreAttribute = NUnitTestFrameworkMetadata.AttributeName("Ignore");
|
||||
return this._ignoreAttribute;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Whether the ignore attribute constructor takes a message as its first argument.
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
protected override bool HasIgnoreAttributeMessage
|
||||
{
|
||||
get { return true; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the ignore message property.
|
||||
/// </summary>
|
||||
/// <value>The ignore message property.</value>
|
||||
protected override string IgnoreMessageProperty
|
||||
{
|
||||
get { return "Reason"; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the expected exception property name.
|
||||
/// </summary>
|
||||
/// <value>The expected exception property.</value>
|
||||
protected override string ExpectedExceptionProperty
|
||||
{
|
||||
get { return "ExceptionType"; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets a list of attribute that should be duplicated from the
|
||||
/// pex test to the parameterized test
|
||||
/// </summary>
|
||||
/// <returns>
|
||||
/// The <see cref="IEnumerable"/>.
|
||||
/// </returns>
|
||||
protected override IEnumerable<TypeName> GetSatelliteAttributeTypes()
|
||||
{
|
||||
return Indexable.Array<TypeName>(
|
||||
this.CategoryAttribute,
|
||||
NUnitTestFrameworkMetadata.AttributeName("Description"),
|
||||
NUnitTestFrameworkMetadata.AttributeName("Explicit"),
|
||||
NUnitTestFrameworkMetadata.AttributeName("Platform"),
|
||||
NUnitTestFrameworkMetadata.AttributeName("Property")
|
||||
);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The _category attribute.
|
||||
/// </summary>
|
||||
[NonSerialized]
|
||||
TypeName _categoryAttribute;
|
||||
|
||||
/// <summary>
|
||||
/// Gets the category attribute.
|
||||
/// </summary>
|
||||
private TypeName CategoryAttribute
|
||||
{
|
||||
get
|
||||
{
|
||||
if (this._categoryAttribute == null)
|
||||
this._categoryAttribute = NUnitTestFrameworkMetadata.AttributeName("Category");
|
||||
return this._categoryAttribute;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Tries the get categories.
|
||||
/// </summary>
|
||||
/// <param name="element">
|
||||
/// The element.
|
||||
/// </param>
|
||||
/// <param name="names">
|
||||
/// The names.
|
||||
/// </param>
|
||||
/// <returns>
|
||||
/// The <see cref="bool"/>.
|
||||
/// </returns>
|
||||
protected override bool TryGetCategories(
|
||||
ICustomAttributeProviderEx element,
|
||||
out IEnumerable<string> names)
|
||||
{
|
||||
SafeDebug.AssumeNotNull(element, "element");
|
||||
|
||||
// TODO
|
||||
names = null;
|
||||
return false;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The _assertion exception type.
|
||||
/// </summary>
|
||||
[NonSerialized]
|
||||
TypeName _assertionExceptionType;
|
||||
|
||||
/// <summary>
|
||||
/// Gets the type of the assertion exception.
|
||||
/// </summary>
|
||||
/// <value>The type of the assertion exception.</value>
|
||||
public override TypeName AssertionExceptionType
|
||||
{
|
||||
get
|
||||
{
|
||||
System.Diagnostics.Debugger.Launch();
|
||||
if (this._assertionExceptionType == null)
|
||||
this._assertionExceptionType = TypeDefinitionName.FromName(
|
||||
NUnitTestFrameworkMetadata.AssemblyName,
|
||||
-1,
|
||||
false,
|
||||
NUnitTestFrameworkMetadata.RootNamespace,
|
||||
"AssertionException").SelfInstantiation;
|
||||
return this._assertionExceptionType;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets a value indicating whether supports static test methods.
|
||||
/// </summary>
|
||||
public override bool SupportsStaticTestMethods
|
||||
{
|
||||
get { return false; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the assert method filters.
|
||||
/// </summary>
|
||||
public override IIndexable<IAssertMethodFilter> AssertMethodFilters
|
||||
{
|
||||
get
|
||||
{
|
||||
return Indexable.One<IAssertMethodFilter>(NUnitAssertMethodFilter.Instance);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,45 @@
|
|||
// --------------------------------------------------------------------------------------------------------------------
|
||||
// <copyright file="NUnitTestFrameworkPackage.cs" company="Microsoft">
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// </copyright>
|
||||
// <summary>
|
||||
// Package declaration for NUnit test framework.
|
||||
// </summary>
|
||||
// --------------------------------------------------------------------------------------------------------------------
|
||||
using Microsoft.Pex.Framework.Packages;
|
||||
|
||||
using Samples.Extensions.NUnit;
|
||||
|
||||
[assembly: PexPackageType(typeof(NUnitTestFrameworkPackage))]
|
||||
|
||||
namespace Samples.Extensions.NUnit
|
||||
{
|
||||
using Microsoft.ExtendedReflection.ComponentModel;
|
||||
using Microsoft.Pex.Engine.ComponentModel;
|
||||
using Microsoft.Pex.Engine.TestFrameworks;
|
||||
|
||||
using Microsoft.Pex.Framework.Packages;
|
||||
|
||||
/// <summary>
|
||||
/// Sample extensions package for NUnit.
|
||||
/// </summary>
|
||||
public class NunitTestFrameworkPackageAttribute : PexPackageAttributeBase
|
||||
{
|
||||
protected override void Initialize(IEngine engine)
|
||||
{
|
||||
base.Initialize(engine);
|
||||
|
||||
var testFrameworkService = engine.GetService<IPexTestFrameworkManager>();
|
||||
var host = testFrameworkService as IPexComponent;
|
||||
|
||||
testFrameworkService.AddTestFramework(new NUnitTestFramework(host));
|
||||
}
|
||||
|
||||
public override string Name => "NUnitTestFrameworkPackage";
|
||||
}
|
||||
|
||||
[NunitTestFrameworkPackage]
|
||||
static class NUnitTestFrameworkPackage
|
||||
{
|
||||
}
|
||||
}
|
|
@ -0,0 +1,50 @@
|
|||
// --------------------------------------------------------------------------------------------------------------------
|
||||
// <copyright file="NunitTestFrameworkMetadata.cs" company="Microsoft">
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// </copyright>
|
||||
// <summary>
|
||||
// Metadata for the NUnit framework.
|
||||
// </summary>
|
||||
// --------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
namespace Samples.Extensions.NUnit
|
||||
{
|
||||
using Microsoft.ExtendedReflection.Metadata.Names;
|
||||
using Microsoft.ExtendedReflection.Utilities.Safe.Diagnostics;
|
||||
|
||||
/// <summary>
|
||||
/// The metadata.
|
||||
/// </summary>
|
||||
internal static class NUnitTestFrameworkMetadata
|
||||
{
|
||||
internal static readonly ShortAssemblyName AssemblyName = ShortAssemblyName.FromName("nunit.framework");
|
||||
|
||||
internal static readonly string RootNamespace = "NUnit.Framework";
|
||||
|
||||
public static TypeName AttributeName(string name)
|
||||
{
|
||||
return TypeDefinitionName.FromName(
|
||||
AssemblyName,
|
||||
-1,
|
||||
false,
|
||||
RootNamespace,
|
||||
name + "Attribute").SelfInstantiation;
|
||||
}
|
||||
|
||||
private static TypeName TypeName(string name)
|
||||
{
|
||||
SafeDebug.AssumeNotNullOrEmpty(name, "name");
|
||||
return TypeDefinitionName.FromName(
|
||||
AssemblyName,
|
||||
-1,
|
||||
false,
|
||||
RootNamespace,
|
||||
name).SelfInstantiation;
|
||||
}
|
||||
|
||||
public static readonly TypeName AssertType = NUnitTestFrameworkMetadata.TypeName("Assert");
|
||||
public static readonly TypeDefinitionName AssertTypeDefinition = AssertType.Definition;
|
||||
public static readonly TypeName CollectionAssertType = NUnitTestFrameworkMetadata.TypeName("CollectionAssert");
|
||||
public static readonly TypeDefinitionName CollectionAssertTypeDefinition = CollectionAssertType.Definition;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,36 @@
|
|||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
[assembly: AssemblyTitle("NUnit")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("NUnit")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2015")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// Setting ComVisible to false makes the types in this assembly not visible
|
||||
// to COM components. If you need to access a type in this assembly from
|
||||
// COM, set the ComVisible attribute to true on that type.
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// The following GUID is for the ID of the typelib if this project is exposed to COM
|
||||
[assembly: Guid("9b87dc9e-151c-4f94-959f-657bbf72645f")]
|
||||
|
||||
// Version information for an assembly consists of the following four values:
|
||||
//
|
||||
// Major Version
|
||||
// Minor Version
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
// You can specify all the values or you can default the Build and Revision Numbers
|
||||
// by using the '*' as shown below:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
|
@ -0,0 +1,13 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RuleSet Name="Osiris.Extended" ToolsVersion="11.0">
|
||||
<Include Path="basiccorrectnessrules.ruleset" Action="Default" />
|
||||
<Include Path="basicdesignguidelinerules.ruleset" Action="Default" />
|
||||
<Include Path="extendeddesignguidelinerules.ruleset" Action="Default" />
|
||||
<Include Path="globalizationrules.ruleset" Action="Default" />
|
||||
<Include Path="minimumrecommendedrules.ruleset" Action="Default" />
|
||||
<Rules AnalyzerId="Microsoft.Analyzers.ManagedCodeAnalysis" RuleNamespace="Microsoft.Rules.Managed">
|
||||
<Rule Id="CA1062" Action="None" />
|
||||
<Rule Id="CA1704" Action="None" />
|
||||
<Rule Id="CA1709" Action="None" />
|
||||
</Rules>
|
||||
</RuleSet>
|
|
@ -0,0 +1,34 @@
|
|||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio 14
|
||||
VisualStudioVersion = 14.0.23020.0
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Package", "Package\Package.csproj", "{A773B258-30DD-4698-8601-ECC742A712DC}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CreateUnitTests.NUnit", "CreateUnitTests.NUnit\CreateUnitTests.NUnit.csproj", "{9635AFF9-7554-434D-AA63-556313342E5A}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IntelliTest.NUnit", "IntelliTest.NUnit\IntelliTest.NUnit.csproj", "{9B87DC9E-151C-4F94-959F-657BBF72645F}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Release|Any CPU = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{A773B258-30DD-4698-8601-ECC742A712DC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{A773B258-30DD-4698-8601-ECC742A712DC}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{A773B258-30DD-4698-8601-ECC742A712DC}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{A773B258-30DD-4698-8601-ECC742A712DC}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{9635AFF9-7554-434D-AA63-556313342E5A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{9635AFF9-7554-434D-AA63-556313342E5A}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{9635AFF9-7554-434D-AA63-556313342E5A}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{9635AFF9-7554-434D-AA63-556313342E5A}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{9B87DC9E-151C-4F94-959F-657BBF72645F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{9B87DC9E-151C-4F94-959F-657BBF72645F}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{9B87DC9E-151C-4F94-959F-657BBF72645F}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{9B87DC9E-151C-4F94-959F-657BBF72645F}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
EndGlobal
|
|
@ -0,0 +1,3 @@
|
|||
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
|
||||
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/PredefinedNamingRules/=PrivateInstanceFields/@EntryIndexedValue"><Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" /></s:String>
|
||||
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/PredefinedNamingRules/=PrivateStaticFields/@EntryIndexedValue"><Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" /></s:String></wpf:ResourceDictionary>
|
|
@ -0,0 +1,76 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<MinimumVisualStudioVersion>14.0</MinimumVisualStudioVersion>
|
||||
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<ProjectTypeGuids>{82b43b9b-a64c-4715-b499-d71e9ca2bd60};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
|
||||
<ProjectGuid>{A773B258-30DD-4698-8601-ECC742A712DC}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>Package</RootNamespace>
|
||||
<AssemblyName>Package</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
|
||||
<GeneratePkgDefFile>false</GeneratePkgDefFile>
|
||||
<IncludeAssemblyInVSIXContainer>false</IncludeAssemblyInVSIXContainer>
|
||||
<IncludeDebugSymbolsInVSIXContainer>false</IncludeDebugSymbolsInVSIXContainer>
|
||||
<IncludeDebugSymbolsInLocalVSIXDeployment>false</IncludeDebugSymbolsInLocalVSIXDeployment>
|
||||
<CopyBuildOutputToOutputDirectory>false</CopyBuildOutputToOutputDirectory>
|
||||
<CopyOutputSymbolsToOutputDirectory>false</CopyOutputSymbolsToOutputDirectory>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="source.extension.vsixmanifest">
|
||||
<SubType>Designer</SubType>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="index.html" />
|
||||
<Content Include="stylesheet.css" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\CreateUnitTests.NUnit\CreateUnitTests.NUnit.csproj">
|
||||
<Project>{9635AFF9-7554-434D-AA63-556313342E5A}</Project>
|
||||
<Name>CreateUnitTests.NUnit</Name>
|
||||
<IncludeOutputGroupsInVSIX>BuiltProjectOutputGroup%3bBuiltProjectOutputGroupDependencies%3bGetCopyToOutputDirectoryItems%3bSatelliteDllsProjectOutputGroup%3b</IncludeOutputGroupsInVSIX>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\IntelliTest.NUnit\IntelliTest.NUnit.csproj">
|
||||
<Project>{9B87DC9E-151C-4F94-959F-657BBF72645F}</Project>
|
||||
<Name>IntelliTest.NUnit</Name>
|
||||
<IncludeOutputGroupsInVSIX>BuiltProjectOutputGroup%3bBuiltProjectOutputGroupDependencies%3bGetCopyToOutputDirectoryItems%3bSatelliteDllsProjectOutputGroup%3b</IncludeOutputGroupsInVSIX>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<Import Project="$(VSToolsPath)\VSSDK\Microsoft.VsSDK.targets" Condition="'$(VSToolsPath)' != ''" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
</Target>
|
||||
<Target Name="AfterBuild">
|
||||
</Target>
|
||||
-->
|
||||
</Project>
|
|
@ -0,0 +1,33 @@
|
|||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
[assembly: AssemblyTitle("Package")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("Package")]
|
||||
[assembly: AssemblyCopyright("")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// Setting ComVisible to false makes the types in this assembly not visible
|
||||
// to COM components. If you need to access a type in this assembly from
|
||||
// COM, set the ComVisible attribute to true on that type.
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// Version information for an assembly consists of the following four values:
|
||||
//
|
||||
// Major Version
|
||||
// Minor Version
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
// You can specify all the values or you can default the Build and Revision Numbers
|
||||
// by using the '*' as shown below:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
|
@ -0,0 +1,86 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset='utf-8'>
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="stylesheet.css" media="screen">
|
||||
|
||||
<title>Getting Started</title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="container">
|
||||
<div id="header">
|
||||
<h1>Getting Started</h1>
|
||||
<h2>Visual Studio Extensions</h2>
|
||||
</div>
|
||||
|
||||
<div id="main_content">
|
||||
<div id="lpanel">
|
||||
<h1>Creating a Visual Studio Extension</h1>
|
||||
|
||||
<p>This VSIX project enables developers to take advantage of the extensibility APIs in the Visual Studio 2015 IDE Software Development Kit. The solution contains a VSIX project that packages the extension into a VSIX file. This file is used to install an extension for Visual Studio.</p>
|
||||
<p>To add new features to the extension:</p>
|
||||
|
||||
<ol>
|
||||
<li>Right-click the project node in Solution Explorer and select Add>New Item.</li>
|
||||
<li>In the Add New Item dialog box, expand the Extensibility node under Visual C# or Visual Basic.</li>
|
||||
<li>Choose from the available Item templates: Visual Studio Package, Editor Items (Classifier, Margin, Text Adornment, Viewport Adornment), Commands, Tool Window, etc., and then click Add.</li>
|
||||
</ol>
|
||||
|
||||
<p>The files for the template that you selected are added to the project. You can start adding functionality to your item template, press F5 to run the project, or add another Item template.</p>
|
||||
|
||||
<p>To run the project, press F5. Visual Studio will:</p>
|
||||
|
||||
<ul>
|
||||
<li>Build the extension from the VSIX project.</li>
|
||||
<li>Create the VSIX package from the VSIX project.</li>
|
||||
<li>When debugging, start an experimental instance of Visual Studio with the VSIX package installed.</li>
|
||||
</ul>
|
||||
|
||||
<p>In the experimental instance of Visual Studio you can test out the functionality of your extension without affecting your Visual Studio installation.</p>
|
||||
|
||||
</div>
|
||||
<div id="rpanel">
|
||||
|
||||
<h1>Visual Studio Extensibility Resources</h1>
|
||||
|
||||
<p>Check out the <a href="http://aka.ms/extendvs">VS Extensibility Dev Center</a>, the extensibility samples, and the <a href="https://msdn.microsoft.com/en-us/library/bb166030(v=vs.140).aspx">extensibility documentation</a> to learn more about building extensions. </p>
|
||||
|
||||
<h1>Community Extensions</h1>
|
||||
|
||||
<p>Here you can see other extensions that the Visual Studio Community has developed</p>
|
||||
|
||||
<ul>
|
||||
<li>
|
||||
<a href="https://github.com/madskristensen/WebEssentials2015">Web Essentials 2015</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="https://github.com/ligershark/side-waffle">SideWaffle</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="https://github.com/AlaShiban/MultiEdit">MultiEdit</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="https://github.com/madskristensen/ExtensibilityTools">Extensibility Tools</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="https://github.com/madskristensen/TrailingWhitespace">Remove Trailing Whitespace</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="https://github.com/madskristensen/ReactSnippetPack">React Snippet Pack</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="https://github.com/madskristensen/AddAnyFile">Add Any File to a Project</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="https://github.com/microsoft/vsminecraft">Visual Studio Minecraft</a>
|
||||
</li>
|
||||
</ul>
|
||||
<h1>Give us feedback</h1>
|
||||
<p><a href="http://aka.ms/extend-feedback">UserVoice</a></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,18 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<PackageManifest Version="2.0.0" xmlns="http://schemas.microsoft.com/developer/vsx-schema/2011" xmlns:d="http://schemas.microsoft.com/developer/vsx-schema-design/2011">
|
||||
<Metadata>
|
||||
<Identity Id="Package.Company.113f61ed-a246-4431-809d-bcd393642488" Version="1.0" Language="en-US" Publisher="Company" />
|
||||
<DisplayName>Package for Test Generation Nunit extensions</DisplayName>
|
||||
<Description xml:space="preserve">Package for Test Generation Nunit extensions</Description>
|
||||
</Metadata>
|
||||
<Installation>
|
||||
<InstallationTarget Id="Microsoft.VisualStudio.Community" Version="[14.0]" />
|
||||
</Installation>
|
||||
<Dependencies>
|
||||
<Dependency Id="Microsoft.Framework.NDP" DisplayName="Microsoft .NET Framework" d:Source="Manual" Version="[4.5,)" />
|
||||
</Dependencies>
|
||||
<Assets>
|
||||
<Asset Type="Microsoft.VisualStudio.IntellitestExtension" d:Source="Project" d:ProjectName="IntelliTest.NUnit" Path="|IntelliTest.NUnit|" />
|
||||
<Asset Type="Microsoft.VisualStudio.TestGenerationExtension" d:Source="Project" d:ProjectName="CreateUnitTests.NUnit" Path="|CreateUnitTests.NUnit|" />
|
||||
</Assets>
|
||||
</PackageManifest>
|
|
@ -0,0 +1,122 @@
|
|||
body {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
border: 0;
|
||||
color: #1E1E1E;
|
||||
font-size: 13px;
|
||||
font-family: "Segoe UI", Helvetica, Arial, sans-serif;
|
||||
line-height: 1.45;
|
||||
word-wrap: break-word;
|
||||
}
|
||||
|
||||
/* General & 'Reset' Stuff */
|
||||
|
||||
|
||||
.container {
|
||||
width: 980px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
section {
|
||||
display: block;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
h1, h2, h3, h4, h5, h6 {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
/* Header, <header>
|
||||
header - container
|
||||
h1 - project name
|
||||
h2 - project description
|
||||
*/
|
||||
|
||||
#header {
|
||||
color: #FFF;
|
||||
background: #68217a;
|
||||
position:relative;
|
||||
}
|
||||
#hangcloud {
|
||||
width: 190px;
|
||||
height: 160px;
|
||||
background: url("../images/bannerart03.png");
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: -30px;
|
||||
}
|
||||
h1, h2 {
|
||||
font-family: "Segoe UI Light", "Segoe UI", Helvetica, Arial, sans-serif;
|
||||
line-height: 1;
|
||||
margin: 0 18px;;
|
||||
padding: 0;
|
||||
}
|
||||
#header h1 {
|
||||
font-size: 3.4em;
|
||||
padding-top: 18px;
|
||||
font-weight: normal;
|
||||
margin-left: 15px;
|
||||
}
|
||||
|
||||
#header h2 {
|
||||
font-size: 1.5em;
|
||||
margin-top: 10px;
|
||||
padding-bottom: 18px;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
|
||||
#main_content {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
}
|
||||
|
||||
|
||||
h1, h2, h3, h4, h5, h6 {
|
||||
font-weight: bolder;
|
||||
}
|
||||
|
||||
#main_content h1 {
|
||||
font-size: 1.8em;
|
||||
margin-top: 34px;
|
||||
}
|
||||
|
||||
#main_content h1:first-child {
|
||||
margin-top: 30px;
|
||||
}
|
||||
|
||||
#main_content h2 {
|
||||
font-size: 1.8em;
|
||||
}
|
||||
p, ul {
|
||||
margin: 11px 18px;
|
||||
}
|
||||
|
||||
#main_content a {
|
||||
color: #06C;
|
||||
text-decoration: none;
|
||||
}
|
||||
ul {
|
||||
margin-top: 13px;
|
||||
margin-left: 18px;
|
||||
padding-left: 0;
|
||||
}
|
||||
ul li {
|
||||
margin-left: 18px;
|
||||
padding-left: 0;
|
||||
}
|
||||
#lpanel {
|
||||
width: 620px;
|
||||
float: left;
|
||||
}
|
||||
#rpanel ul {
|
||||
list-style-type: none;
|
||||
}
|
||||
#rpanel ul li {
|
||||
line-height: 1.8em;
|
||||
}
|
||||
#rpanel {
|
||||
background: #e7e7e7;
|
||||
width: 360px;
|
||||
}
|
Загрузка…
Ссылка в новой задаче