From d5cbf26cce433f19fb6ad2a2e8be14373d1619d2 Mon Sep 17 00:00:00 2001 From: Terje Sandstrom Date: Thu, 16 Jul 2015 20:42:56 +0200 Subject: [PATCH] Updated code. Set version to 0.9.0. --- .../NUnitFrameworkProvider.cs | 2 +- CreateUnitTests.NUnit/NUnitSolutionManager.cs | 2 +- IntelliTest.NUnit/IntelliTest.NUnit.csproj | 2 + IntelliTest.NUnit/NUnit2TestFramework.cs | 379 ++++++++++++++++++ IntelliTest.NUnit/NUnitTestFramework.cs | 365 +---------------- .../NUnitTestFrameworkPackage.cs | 27 +- Osiris.Extended.ruleset | 1 + .../TestGeneration.Extensions.NUnit.csproj | 8 + TestGeneration.Extensions.NUnit/license.txt | 2 +- .../nunit3_32x32.png | Bin 0 -> 1541 bytes TestGeneration.Extensions.NUnit/preview.jpg | Bin 0 -> 7082 bytes .../source.extension.vsixmanifest | 10 +- 12 files changed, 405 insertions(+), 393 deletions(-) create mode 100644 IntelliTest.NUnit/NUnit2TestFramework.cs create mode 100644 TestGeneration.Extensions.NUnit/nunit3_32x32.png create mode 100644 TestGeneration.Extensions.NUnit/preview.jpg diff --git a/CreateUnitTests.NUnit/NUnitFrameworkProvider.cs b/CreateUnitTests.NUnit/NUnitFrameworkProvider.cs index 05d94a2..8846c35 100644 --- a/CreateUnitTests.NUnit/NUnitFrameworkProvider.cs +++ b/CreateUnitTests.NUnit/NUnitFrameworkProvider.cs @@ -23,7 +23,7 @@ namespace TestGeneration.Extensions.NUnit public class NUnitFrameworkProvider : FrameworkProviderBase { /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// /// The service provider to use to get the interfaces required. /// The configuration settings object to be used to determine how the test method is generated. diff --git a/CreateUnitTests.NUnit/NUnitSolutionManager.cs b/CreateUnitTests.NUnit/NUnitSolutionManager.cs index 194c378..b49c943 100644 --- a/CreateUnitTests.NUnit/NUnitSolutionManager.cs +++ b/CreateUnitTests.NUnit/NUnitSolutionManager.cs @@ -37,7 +37,7 @@ protected override void OnUnitTestProjectCreated(Project unitTestProject, CodeFu TraceLogger.LogInfo("NUnitSolutionManager.OnUnitTestProjectCreated: Adding reference to NUnit assemblies through nuget."); base.OnUnitTestProjectCreated(unitTestProject, sourceMethod); - this.EnsureNuGetReference(unitTestProject, "NUnit", "3.0.0-beta-2"); + this.EnsureNuGetReference(unitTestProject, "NUnit", "3.0.0-beta-3"); var vsp = unitTestProject.Object as VSProject2; var reference = vsp?.References.Find(GlobalConstants.MSTestAssemblyName); diff --git a/IntelliTest.NUnit/IntelliTest.NUnit.csproj b/IntelliTest.NUnit/IntelliTest.NUnit.csproj index 5b1ed59..490158c 100644 --- a/IntelliTest.NUnit/IntelliTest.NUnit.csproj +++ b/IntelliTest.NUnit/IntelliTest.NUnit.csproj @@ -29,6 +29,7 @@ TRACE prompt 4 + ..\Osiris.Extended.ruleset @@ -53,6 +54,7 @@ + diff --git a/IntelliTest.NUnit/NUnit2TestFramework.cs b/IntelliTest.NUnit/NUnit2TestFramework.cs new file mode 100644 index 0000000..a805bbd --- /dev/null +++ b/IntelliTest.NUnit/NUnit2TestFramework.cs @@ -0,0 +1,379 @@ +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; + +namespace TestGeneration.Extensions.IntelliTest.NUnit +{ + /// + /// NUnit 2 test framework + /// + [Serializable] + sealed class NUnit2TestFramework : AttributeBasedTestFrameworkBase + { + /// + /// Initializes a new instance of the class. + /// + /// + /// + public NUnit2TestFramework(IPexComponent host) + : base(host) + { } + + /// + /// identify of the test framework + /// + /// + public override string Name => "NUnit2"; + + /// + /// Gets the assembly name of the framework main's assembly. This name is used + /// to automatically discover test frameworks, based the assembly references + /// + /// + public override ShortAssemblyName AssemblyName => NUnitTestFrameworkMetadata.AssemblyName; + + /// + /// Gets the root namespace. + /// + /// The root namespace. + public override string RootNamespace => NUnitTestFrameworkMetadata.RootNamespace; + + /// + /// The test framework references. + /// + public override ICountable References => Indexable.One(new ShortReferenceAssemblyName(ShortAssemblyName.FromName("NUnit"), "2.6.4", AssemblyReferenceType.NugetReference)); + + /// + /// The _directory. + /// + private string directory = null; + + /// + /// Hint on the location of the test framework assembly + /// + /// + /// The directory. + /// + /// + /// The . + /// + public override bool TryGetDirectory(out string pdirectory) + { + if (directory == null) + { + var programFiles = new DirectoryInfo(Environment.ExpandEnvironmentVariables("%ProgramFiles%")); + var info = programFiles.GetDirectories("NUnit-Net-*", SearchOption.TopDirectoryOnly); + directory = info.Length == 0 ? string.Empty : Path.Combine(info[0].FullName, "bin"); + } + + pdirectory = directory; + return !SafeString.IsNullOrEmpty(directory); + } + + /// + /// Gets a value indicating whether + /// partial test classes + /// + /// + public override bool SupportsPartialClasses => true; + + /// + /// The supports project bitness. + /// + /// + /// The bitness. + /// + /// + /// The . + /// + public override bool SupportsProjectBitness(Bitness bitness) + { + SafeDebug.Assume(bitness != Bitness.Unsupported, "bitness != Bitness.Unsupported"); + return true; + } + + /// + /// The _expected exception attribute. + /// + [NonSerialized] + TypeName expectedExceptionAttribute; + + /// + /// Gets the ExpectedException attribute. + /// + /// The expected exception attribute. + public override TypeName ExpectedExceptionAttribute => expectedExceptionAttribute ?? + (expectedExceptionAttribute = NUnitTestFrameworkMetadata.AttributeName("ExpectedException")); + + /// + /// Tries the read expected exception. + /// + /// + /// The method. + /// + /// + /// Type of the exception. + /// + /// + /// The . + /// + public override bool TryReadExpectedException(ICustomAttributeProviderEx target, out TypeEx exceptionType) + { + var attribute = AttributeHelper.GetAttribute(target, ExpectedExceptionAttribute); + if (attribute != null) + { + var attributeType = attribute.GetType(); + + // read exception type using reflection. + var field = attributeType.GetField("expectedException", BindingFlags.NonPublic | BindingFlags.Instance); + if (field != null) + { + var 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; + } + + /// + /// Tries to get the assembly set up tear down attribute. + /// + /// + /// The assembly. + /// + /// + /// The set up. + /// + /// + /// The tear down. + /// + /// + /// The . + /// + public override bool TryGetAssemblySetupTeardownMethods(AssemblyEx assembly, out Method setUp, out Method tearDown) + { + setUp = null; + tearDown = null; + return false; + } + + /// + /// Gets a value indicating whether[fixture set up tear down are instance methods. + /// + /// + /// true if [fixture set up tear down instance]; otherwise, false. + /// + public override bool FixtureSetupTeardownInstance => true; + + /// + /// The _fixture attribute. + /// + [NonSerialized] + TypeName fixtureAttribute; + + /// + /// Gets the name of the fixture attribute + /// + /// The fixture attribute. + public override TypeName FixtureAttribute => fixtureAttribute ?? + (fixtureAttribute = NUnitTestFrameworkMetadata.AttributeName("TestFixture")); + + /// + /// The _fixture set up attribute. + /// + [NonSerialized] + TypeName fixtureSetUpAttribute; + + /// + /// Gets the name of the fixture setup attribute + /// + /// The fixture set up attribute. + public override TypeName FixtureSetupAttribute => fixtureSetUpAttribute ?? + (fixtureSetUpAttribute = NUnitTestFrameworkMetadata.AttributeName("TestFixtureSetUp")); + + /// + /// The _fixture tear down attribute. + /// + [NonSerialized] + TypeName fixtureTearDownAttribute; + + /// + /// Gets the name of the fixture teardown attribute + /// + /// The fixture tear down attribute. + public override TypeName FixtureTeardownAttribute => fixtureTearDownAttribute ?? + (fixtureTearDownAttribute = NUnitTestFrameworkMetadata.AttributeName("TestFixtureTearDown")); + + /// + /// The _set up attribute. + /// + [NonSerialized] + TypeName setUpAttribute; + + /// + /// Gets the name of the test setup attribute. + /// + /// The set up attribute. + public override TypeName SetupAttribute => setUpAttribute ?? + (setUpAttribute = NUnitTestFrameworkMetadata.AttributeName("SetUp")); + + /// + /// The _test attribute. + /// + [NonSerialized] + TypeName testAttribute; + + /// + /// Gets the name of the test attribute. + /// + /// The set up attribute. + public override TypeName TestAttribute => testAttribute ?? (testAttribute = NUnitTestFrameworkMetadata.AttributeName("Test")); + + /// + /// The _tear down attribute. + /// + [NonSerialized] + TypeName tearDownAttribute; + + /// + /// Gets the name of the test teardown attribute. + /// + /// The tear down attribute. + public override TypeName TeardownAttribute => tearDownAttribute ?? + (tearDownAttribute = NUnitTestFrameworkMetadata.AttributeName("TearDown")); + + /// + /// The _ignore attribute. + /// + [NonSerialized] + TypeName ignoreAttribute; + + /// + /// Gets the ignore attribute. + /// + /// The ignore attribute. + public override TypeName IgnoreAttribute => ignoreAttribute ?? + (ignoreAttribute = NUnitTestFrameworkMetadata.AttributeName("Ignore")); + + /// + /// Whether the ignore attribute constructor takes a message as its first argument. + /// + /// + protected override bool HasIgnoreAttributeMessage => true; + + /// + /// Gets the ignore message property. + /// + /// The ignore message property. + protected override string IgnoreMessageProperty => "Reason"; + + /// + /// Gets the expected exception property name. + /// + /// The expected exception property. + protected override string ExpectedExceptionProperty => "ExceptionType"; + + /// + /// Gets a list of attribute that should be duplicated from the + /// pex test to the parameterized test + /// + /// + /// The . + /// + protected override IEnumerable GetSatelliteAttributeTypes() + { + return Indexable.Array(CategoryAttribute, + NUnitTestFrameworkMetadata.AttributeName("Description"), + NUnitTestFrameworkMetadata.AttributeName("Explicit"), + NUnitTestFrameworkMetadata.AttributeName("Platform"), + NUnitTestFrameworkMetadata.AttributeName("Property") + ); + } + + /// + /// The _category attribute. + /// + [NonSerialized] + TypeName categoryAttribute; + + /// + /// Gets the category attribute. + /// + private TypeName CategoryAttribute => categoryAttribute ?? + (categoryAttribute = NUnitTestFrameworkMetadata.AttributeName("Category")); + + /// + /// Tries the get categories. + /// + /// + /// The element. + /// + /// + /// The names. + /// + /// + /// The . + /// + protected override bool TryGetCategories( ICustomAttributeProviderEx element, out IEnumerable names) + { + SafeDebug.AssumeNotNull(element, "element"); + + // TODO + names = null; + return false; + } + + /// + /// The _assertion exception type. + /// + [NonSerialized] + TypeName assertionExceptionType; + + /// + /// Gets the type of the assertion exception. + /// + /// The type of the assertion exception. + public override TypeName AssertionExceptionType + { + get + { + System.Diagnostics.Debugger.Launch(); + return assertionExceptionType ?? (assertionExceptionType = TypeDefinitionName.FromName( + NUnitTestFrameworkMetadata.AssemblyName, + -1, + false, + NUnitTestFrameworkMetadata.RootNamespace, + "AssertionException").SelfInstantiation); + } + } + + /// + /// Gets a value indicating whether supports static test methods. + /// + public override bool SupportsStaticTestMethods => false; + + /// + /// Gets the assert method filters. + /// + public override IIndexable AssertMethodFilters => Indexable.One(NUnitAssertMethodFilter.Instance); + } +} \ No newline at end of file diff --git a/IntelliTest.NUnit/NUnitTestFramework.cs b/IntelliTest.NUnit/NUnitTestFramework.cs index ce4cb6a..a236bbe 100644 --- a/IntelliTest.NUnit/NUnitTestFramework.cs +++ b/IntelliTest.NUnit/NUnitTestFramework.cs @@ -25,369 +25,6 @@ namespace TestGeneration.Extensions.IntelliTest.NUnit using Microsoft.Pex.Engine.ComponentModel; using Microsoft.Pex.Engine.TestFrameworks; - /// - /// NUnit 2 test framework - /// - [Serializable] - sealed class NUnit2TestFramework : AttributeBasedTestFrameworkBase - { - /// - /// Initializes a new instance of the class. - /// - /// - /// - public NUnit2TestFramework(IPexComponent host) - : base(host) - { } - - /// - /// identify of the test framework - /// - /// - public override string Name => "NUnit2"; - - /// - /// Gets the assembly name of the framework main's assembly. This name is used - /// to automatically discover test frameworks, based the assembly references - /// - /// - public override ShortAssemblyName AssemblyName => NUnitTestFrameworkMetadata.AssemblyName; - - /// - /// Gets the root namespace. - /// - /// The root namespace. - public override string RootNamespace => NUnitTestFrameworkMetadata.RootNamespace; - - /// - /// The test framework references. - /// - public override ICountable References => Indexable.One(new ShortReferenceAssemblyName(ShortAssemblyName.FromName("NUnit"), "2.6.4", AssemblyReferenceType.NugetReference)); - - /// - /// The _directory. - /// - private string directory = null; - - /// - /// Hint on the location of the test framework assembly - /// - /// - /// The directory. - /// - /// - /// The . - /// - public override bool TryGetDirectory(out string pdirectory) - { - if (directory == null) - { - var programFiles = new DirectoryInfo(Environment.ExpandEnvironmentVariables("%ProgramFiles%")); - var info = programFiles.GetDirectories("NUnit-Net-*", SearchOption.TopDirectoryOnly); - directory = info.Length == 0 ? string.Empty : Path.Combine(info[0].FullName, "bin"); - } - - pdirectory = directory; - return !SafeString.IsNullOrEmpty(directory); - } - - /// - /// Gets a value indicating whether - /// partial test classes - /// - /// - public override bool SupportsPartialClasses => true; - - /// - /// The supports project bitness. - /// - /// - /// The bitness. - /// - /// - /// The . - /// - public override bool SupportsProjectBitness(Bitness bitness) - { - SafeDebug.Assume(bitness != Bitness.Unsupported, "bitness != Bitness.Unsupported"); - return true; - } - - /// - /// The _expected exception attribute. - /// - [NonSerialized] - TypeName expectedExceptionAttribute; - - /// - /// Gets the ExpectedException attribute. - /// - /// The expected exception attribute. - public override TypeName ExpectedExceptionAttribute => expectedExceptionAttribute ?? - (expectedExceptionAttribute = NUnitTestFrameworkMetadata.AttributeName("ExpectedException")); - - /// - /// Tries the read expected exception. - /// - /// - /// The method. - /// - /// - /// Type of the exception. - /// - /// - /// The . - /// - public override bool TryReadExpectedException(ICustomAttributeProviderEx target, out TypeEx exceptionType) - { - var attribute = AttributeHelper.GetAttribute(target, ExpectedExceptionAttribute); - if (attribute != null) - { - var attributeType = attribute.GetType(); - - // read exception type using reflection. - var field = attributeType.GetField("expectedException", BindingFlags.NonPublic | BindingFlags.Instance); - if (field != null) - { - var 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; - } - - /// - /// Tries to get the assembly set up tear down attribute. - /// - /// - /// The assembly. - /// - /// - /// The set up. - /// - /// - /// The tear down. - /// - /// - /// The . - /// - public override bool TryGetAssemblySetupTeardownMethods(AssemblyEx assembly, out Method setUp, out Method tearDown) - { - setUp = null; - tearDown = null; - return false; - } - - /// - /// Gets a value indicating whether[fixture set up tear down are instance methods. - /// - /// - /// true if [fixture set up tear down instance]; otherwise, false. - /// - public override bool FixtureSetupTeardownInstance => true; - - /// - /// The _fixture attribute. - /// - [NonSerialized] - TypeName fixtureAttribute; - - /// - /// Gets the name of the fixture attribute - /// - /// The fixture attribute. - public override TypeName FixtureAttribute => fixtureAttribute ?? - (fixtureAttribute = NUnitTestFrameworkMetadata.AttributeName("TestFixture")); - - /// - /// The _fixture set up attribute. - /// - [NonSerialized] - TypeName fixtureSetUpAttribute; - - /// - /// Gets the name of the fixture setup attribute - /// - /// The fixture set up attribute. - public override TypeName FixtureSetupAttribute => fixtureSetUpAttribute ?? - (fixtureSetUpAttribute = NUnitTestFrameworkMetadata.AttributeName("TestFixtureSetUp")); - - /// - /// The _fixture tear down attribute. - /// - [NonSerialized] - TypeName fixtureTearDownAttribute; - - /// - /// Gets the name of the fixture teardown attribute - /// - /// The fixture tear down attribute. - public override TypeName FixtureTeardownAttribute => fixtureTearDownAttribute ?? - (fixtureTearDownAttribute = NUnitTestFrameworkMetadata.AttributeName("TestFixtureTearDown")); - - /// - /// The _set up attribute. - /// - [NonSerialized] - TypeName setUpAttribute; - - /// - /// Gets the name of the test setup attribute. - /// - /// The set up attribute. - public override TypeName SetupAttribute => setUpAttribute ?? - (setUpAttribute = NUnitTestFrameworkMetadata.AttributeName("SetUp")); - - /// - /// The _test attribute. - /// - [NonSerialized] - TypeName testAttribute; - - /// - /// Gets the name of the test attribute. - /// - /// The set up attribute. - public override TypeName TestAttribute => testAttribute ?? (testAttribute = NUnitTestFrameworkMetadata.AttributeName("Test")); - - /// - /// The _tear down attribute. - /// - [NonSerialized] - TypeName tearDownAttribute; - - /// - /// Gets the name of the test teardown attribute. - /// - /// The tear down attribute. - public override TypeName TeardownAttribute => tearDownAttribute ?? - (tearDownAttribute = NUnitTestFrameworkMetadata.AttributeName("TearDown")); - - /// - /// The _ignore attribute. - /// - [NonSerialized] - TypeName ignoreAttribute; - - /// - /// Gets the ignore attribute. - /// - /// The ignore attribute. - public override TypeName IgnoreAttribute => ignoreAttribute ?? - (ignoreAttribute = NUnitTestFrameworkMetadata.AttributeName("Ignore")); - - /// - /// Whether the ignore attribute constructor takes a message as its first argument. - /// - /// - protected override bool HasIgnoreAttributeMessage => true; - - /// - /// Gets the ignore message property. - /// - /// The ignore message property. - protected override string IgnoreMessageProperty => "Reason"; - - /// - /// Gets the expected exception property name. - /// - /// The expected exception property. - protected override string ExpectedExceptionProperty => "ExceptionType"; - - /// - /// Gets a list of attribute that should be duplicated from the - /// pex test to the parameterized test - /// - /// - /// The . - /// - protected override IEnumerable GetSatelliteAttributeTypes() - { - return Indexable.Array(CategoryAttribute, - NUnitTestFrameworkMetadata.AttributeName("Description"), - NUnitTestFrameworkMetadata.AttributeName("Explicit"), - NUnitTestFrameworkMetadata.AttributeName("Platform"), - NUnitTestFrameworkMetadata.AttributeName("Property") - ); - } - - /// - /// The _category attribute. - /// - [NonSerialized] - TypeName categoryAttribute; - - /// - /// Gets the category attribute. - /// - private TypeName CategoryAttribute => categoryAttribute ?? - (categoryAttribute = NUnitTestFrameworkMetadata.AttributeName("Category")); - - /// - /// Tries the get categories. - /// - /// - /// The element. - /// - /// - /// The names. - /// - /// - /// The . - /// - protected override bool TryGetCategories( ICustomAttributeProviderEx element, out IEnumerable names) - { - SafeDebug.AssumeNotNull(element, "element"); - - // TODO - names = null; - return false; - } - - /// - /// The _assertion exception type. - /// - [NonSerialized] - TypeName assertionExceptionType; - - /// - /// Gets the type of the assertion exception. - /// - /// The type of the assertion exception. - public override TypeName AssertionExceptionType - { - get - { - System.Diagnostics.Debugger.Launch(); - return assertionExceptionType ?? (assertionExceptionType = TypeDefinitionName.FromName( - NUnitTestFrameworkMetadata.AssemblyName, - -1, - false, - NUnitTestFrameworkMetadata.RootNamespace, - "AssertionException").SelfInstantiation); - } - } - - /// - /// Gets a value indicating whether supports static test methods. - /// - public override bool SupportsStaticTestMethods => false; - - /// - /// Gets the assert method filters. - /// - public override IIndexable AssertMethodFilters => Indexable.One(NUnitAssertMethodFilter.Instance); - } - - /// /// NUnit 2 test framework @@ -426,7 +63,7 @@ public NUnitTestFramework(IPexComponent host) /// /// The test framework references. /// - public override ICountable References => Indexable.One(new ShortReferenceAssemblyName(ShortAssemblyName.FromName("NUnit"), "3.0.0-beta-2", AssemblyReferenceType.NugetReference)); + public override ICountable References => Indexable.One(new ShortReferenceAssemblyName(ShortAssemblyName.FromName("NUnit"), "3.0.0-beta-3", AssemblyReferenceType.NugetReference)); /// /// The _directory. diff --git a/IntelliTest.NUnit/NUnitTestFrameworkPackage.cs b/IntelliTest.NUnit/NUnitTestFrameworkPackage.cs index 289bfdf..e5417dd 100644 --- a/IntelliTest.NUnit/NUnitTestFrameworkPackage.cs +++ b/IntelliTest.NUnit/NUnitTestFrameworkPackage.cs @@ -11,7 +11,7 @@ using TestGeneration.Extensions.IntelliTest.NUnit; -[assembly: PexPackageType(typeof(NUnit2TestFrameworkPackage))] + [assembly: PexPackageType(typeof(NUnitTestFrameworkPackage))] namespace TestGeneration.Extensions.IntelliTest.NUnit @@ -22,28 +22,7 @@ namespace TestGeneration.Extensions.IntelliTest.NUnit using Microsoft.Pex.Framework.Packages; - /// - /// Extensions package for NUnit. - /// - public class Nunit2TestFrameworkPackageAttribute : PexPackageAttributeBase - { - protected override void Initialize(IEngine engine) - { - base.Initialize(engine); - - var testFrameworkService = engine.GetService(); - var host = testFrameworkService as IPexComponent; - - testFrameworkService.AddTestFramework(new NUnit2TestFramework(host)); - } - - public override string Name => nameof(NUnit2TestFrameworkPackage); - } - - [Nunit2TestFrameworkPackage] - static class NUnit2TestFrameworkPackage - { - } + public class NunitTestFrameworkPackageAttribute : PexPackageAttributeBase @@ -56,7 +35,9 @@ protected override void Initialize(IEngine engine) var host = testFrameworkService as IPexComponent; testFrameworkService.AddTestFramework(new NUnitTestFramework(host)); + testFrameworkService.AddTestFramework(new NUnit2TestFramework(host)); } + public override string Name => nameof(NUnitTestFrameworkPackage); } diff --git a/Osiris.Extended.ruleset b/Osiris.Extended.ruleset index 1ad3bbc..8617687 100644 --- a/Osiris.Extended.ruleset +++ b/Osiris.Extended.ruleset @@ -6,6 +6,7 @@ + diff --git a/TestGeneration.Extensions.NUnit/TestGeneration.Extensions.NUnit.csproj b/TestGeneration.Extensions.NUnit/TestGeneration.Extensions.NUnit.csproj index 92673dd..4719cf5 100644 --- a/TestGeneration.Extensions.NUnit/TestGeneration.Extensions.NUnit.csproj +++ b/TestGeneration.Extensions.NUnit/TestGeneration.Extensions.NUnit.csproj @@ -54,6 +54,14 @@ Always true + + Always + true + + + Always + true + diff --git a/TestGeneration.Extensions.NUnit/license.txt b/TestGeneration.Extensions.NUnit/license.txt index d550c67..46df4d0 100644 --- a/TestGeneration.Extensions.NUnit/license.txt +++ b/TestGeneration.Extensions.NUnit/license.txt @@ -1,7 +1,7 @@ The MIT License (MIT) Copyright (c) <2015> -Copyright (c) <2015> +Copyright (c) <2015> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/TestGeneration.Extensions.NUnit/nunit3_32x32.png b/TestGeneration.Extensions.NUnit/nunit3_32x32.png new file mode 100644 index 0000000000000000000000000000000000000000..f286be8f1da3260659c52a1d8289828d38894d04 GIT binary patch literal 1541 zcmV+g2KxDlP)N2bZe?^J zG%heMHD!e|WdHyLgGod|R9Hu~R}D;7WfXolw?OVi8b{>Q zxcsF8$q*qmBwY-PQYK+yL_d>AB_~!EN?H5_C2BQO2qn-~LI@=Vf(oDbeW!EY``*j_ zz7O=1@L^};J%{u2zW4mW#)KFqF+~buu@h%8pyL+&-Rz#^ z3u)Uk;Dv1~z-6%qU=Tw{4J=B|XNpU(&>9EC$cxZ$BN92`bW^-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6gIO~^34$^!ldB*!lUH@s$mu?ouebPx;Y(XhRDW&Kk>idOxWKAqjG1UM~QFJ~12LDs<@??DKOJSXpBlI-kXm?TJe_ zaxVeeNVih?wBhQoOu9~a0>PR&rgcX3kRZ0`If3;##ZDDT+IR{-P~M>zH-Cb=*GK$quAJVp(+80l(Q=WnxODOoTia6S+?eO4wAxVbU^`C< zBcV}>9iq6dr_x*N&UFzcd}(=tyK^z6x2=auB(E~__5WO&tk8Hw#Hv(Fm>+%<`;3-( z5u^I0R*paA);a{^fi^xE<4=y)XN(>k%RTcBp84^F!wPE1T(mW;Sl2f>TO^Gy{W_>m zM_r?Sy&xxBUH8VwFWL7PUU*~Lu-+G~KmrRf*7K}SDa|JoUr;tX!nMZam^|{;I#HEE z9-T_xMX`V}wmTYEA;e?+u09d=E?5pEFVlV?z#>39Lgl3XK$Jhqth2jv?zcAwTI7-22$RI45v3f9j5t z=z70)m;Z}N#OB%64~Cy*0jI@dLFS0ITbYc)6%VN)j!1sfyAxg4xiW2EeD^I-I=VO9 z9@iR85~_P@8JqAT*cBBm&_TN(S($WUuuO-$1p=?Q^0(~|zlK2iy}9wglQ)UHK4KEL za7#yt*NHUH7Wr?mdlz|IL|DD!rrAi>m*jcmAgTrn^X57HSBr|6@xz?~(YLs;GN@dT4u6Q?cH|qv)dk%rrXyV8P+7j#+6r*^E%GVo1 zpx_KQBg3L%z%S!_o2n4#^XJzFzuq4FnxyM!pl=-@(!axbk z#}}P;6@^sJ+;^sSB&U~+#4+X1wLpL`bMZ{O$_#G4>pOr7s~G2HW<3ZfGxrl0q$`@N z3##fH2|(U71!>oe@h@UdzqSr?oFJB$UU0qmlIUM)x{))_Yu{w-JUKK}KCw5H_{{}o fU|7{m=h073%m8PHj}+ literal 0 HcmV?d00001 diff --git a/TestGeneration.Extensions.NUnit/source.extension.vsixmanifest b/TestGeneration.Extensions.NUnit/source.extension.vsixmanifest index ee776d3..16aa3c1 100644 --- a/TestGeneration.Extensions.NUnit/source.extension.vsixmanifest +++ b/TestGeneration.Extensions.NUnit/source.extension.vsixmanifest @@ -1,11 +1,15 @@ - - Test Generation NUnit extensions - Test Generation NUnit extensions + + Test Generator NUnit extension + Test Generator, NUnit extensions for Visual Studio 2015. +Creates Unit tests and Initellitests with both NUnit 2.6.4 and NUnit 3 beta frameworks. + https://github.com/nunit/nunit-vs-testgenerator/wiki license.txt + nunit3_32x32.png + preview.jpg unit testing, NUnit