Open GoogleCodeExporter opened 9 years ago
Is that the R# plugin?
Original comment by grahamr...@gmail.com
on 28 Sep 2011 at 7:57
I'm experiencing this as well. I've added mbUnit & Gallio via NuGet (and have
gallio 3.3.1)
In the below Territory.UkShortName is a public string and Policy.ModifierType
is a public enum both in the module the test references.
This test compiles happily
[Test]
[Row("rock", Territory.UkShortName, 5.04, 3)]
public void ShouldGetCorrectModifiersWhenReadingFile(string policyName,
string territoryName,
decimal? expectedPrice,
int modiferInt)
{
var modifier = (Policy.ModifierType) modiferInt;
Assert.AreEqual(expectedPrice,
_factory.Policies[policyName]
.Territories[territoryName]
.GetModifierValue(modifier));
}
whereas
[Test]
[Row("rock", Territory.UkShortName, 5.04,
Policy.ModifierType.NineToTwentyWeeks)]
public void ShouldGetCorrectModifiersWhenReadingFile(string policyName,
string territoryName,
decimal? expectedPrice,
Policy.ModifierType modifier)
{
Assert.AreEqual(expectedPrice,
_factory.Policies[policyName]
.Territories[territoryName]
.GetModifierValue(modifier));
}
Outputs:
[error] An exception was thrown while exploring tests.
Location: C:\Programming\ReadingPrices\ReadingPrices\ReadAlanFormatPrices.cs(66)
Details: System.IO.FileNotFoundException: Could not resolve: RavenDal, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
at Mono.Cecil.BaseAssemblyResolver.Resolve(AssemblyNameReference name)
at Mono.Cecil.DefaultAssemblyResolver.Resolve(AssemblyNameReference name)
at Mono.Cecil.MetadataResolver.Resolve(IAssemblyResolver resolver, TypeReference type)
at Mono.Cecil.TypeReference.Resolve()
at Mono.Cecil.Mixin.CheckedResolve(TypeReference self)
at Mono.Cecil.SignatureReader.ReadCustomAttributeEnum(TypeReference enum_type)
at Mono.Cecil.SignatureReader.ReadCustomAttributeElementValue(TypeReference type)
at Mono.Cecil.SignatureReader.ReadCustomAttributeElement(TypeReference type)
at Mono.Cecil.SignatureReader.ReadCustomAttributeElement(TypeReference type)
at Mono.Cecil.SignatureReader.ReadCustomAttributeFixedArrayArgument(ArrayType type)
at Mono.Cecil.SignatureReader.ReadCustomAttributeFixedArgument(TypeReference type)
at Mono.Cecil.SignatureReader.ReadCustomAttributeConstructorArguments(CustomAttribute attribute, Collection`1 parameters)
at Mono.Cecil.MetadataReader.ReadCustomAttributeSignature(CustomAttribute attribute)
at Mono.Cecil.CustomAttribute.<Resolve>b__2(CustomAttribute attribute, MetadataReader reader)
at Mono.Cecil.ModuleDefinition.Read[TItem,TRet](TItem item, Func`3 read)
at Mono.Cecil.CustomAttribute.Resolve()
at Mono.Cecil.CustomAttribute.get_ConstructorArguments()
at Gallio.Common.Reflection.Impl.CecilReflectionPolicy.GetAttributeConstructorArguments(StaticAttributeWrapper attribute) in c:\Server\Projects\MbUnit v3.3\Work\src\Gallio\Gallio\Common\Reflection\Impl\CecilReflectionPolicy.cs:line 248
at Gallio.Common.Reflection.Impl.StaticAttributeWrapper.get_InitializedArgumentValues() in c:\Server\Projects\MbUnit v3.3\Work\src\Gallio\Gallio\Common\Reflection\Impl\StaticAttributeWrapper.cs:line 98
at Gallio.Common.Reflection.Impl.ReflectorAttributeUtils.CreateAttribute(IAttributeInfo attribute, Boolean throwOnError) in c:\Server\Projects\MbUnit v3.3\Work\src\Gallio\Gallio\Common\Reflection\Impl\ReflectorAttributeUtils.cs:line 54
at Gallio.Common.Reflection.Impl.StaticAttributeWrapper.<>c__DisplayClass10.<Resolve>b__f() in c:\Server\Projects\MbUnit v3.3\Work\src\Gallio\Gallio\Common\Reflection\Impl\StaticAttributeWrapper.cs:line 143
at Gallio.Common.KeyedMemoizer`2.Memoize(TKey key, Func`1 populator) in c:\Server\Projects\MbUnit v3.3\Work\src\Gallio\Gallio\Common\KeyedMemoizer.cs:line 91
at Gallio.Common.Reflection.Impl.StaticAttributeWrapper.Resolve(Boolean throwOnError) in c:\Server\Projects\MbUnit v3.3\Work\src\Gallio\Gallio\Common\Reflection\Impl\StaticAttributeWrapper.cs:line 142
at Gallio.Common.Reflection.AttributeUtils.<ResolveAttributes>d__c.MoveNext() in c:\Server\Projects\MbUnit v3.3\Work\src\Gallio\Gallio\Common\Reflection\AttributeUtils.cs:line 132
at Gallio.Common.Reflection.AttributeUtils.<GetAttributes>d__0`1.MoveNext() in c:\Server\Projects\MbUnit v3.3\Work\src\Gallio\Gallio\Common\Reflection\AttributeUtils.cs:line 50
at Gallio.Framework.Pattern.DeclarativePatternResolver.<GetPatterns>d__0.MoveNext() in c:\Server\Projects\MbUnit v3.3\Work\src\Gallio\Gallio\Framework\Pattern\DeclarativePatternResolver.cs:line 43
at Gallio.Framework.Pattern.DefaultPatternEvaluator.GetPrimaryPattern(ICodeElementInfo codeElement) in c:\Server\Projects\MbUnit v3.3\Work\src\Gallio\Gallio\Framework\Pattern\DefaultPatternEvaluator.cs:line 183
at Gallio.Framework.Pattern.DefaultPatternEvaluator.Consume(IPatternScope containingScope, ICodeElementInfo codeElement, Boolean skipChildren, IPattern defaultPrimaryPattern) in c:\Server\Projects\MbUnit v3.3\Work\src\Gallio\Gallio\Framework\Pattern\DefaultPatternEvaluator.cs:line 127
Original comment by paul.dam...@gmail.com
on 18 Apr 2012 at 2:38
Oops - should add that the Row attribute allows enum parameters when they are
in the same project but not when they are in another project in the solution.
Original comment by paul.dam...@gmail.com
on 18 Apr 2012 at 6:49
I can't reproduce this (see attached). What am I missing?
Original comment by grahamr...@gmail.com
on 23 Apr 2012 at 6:00
Attachments:
Ah, then this might be a project or machine setup thing. When I open your
project in Visual Studio it doesn't see any tests to run.
I can reproduce by
1) creating a class library and adding an enum
2) Adding a test project
3) removing the reference to MS unit testing
4) using nuget add mbunit to the test project
5) add a test using a local enum as a row attribute and it compiles & runs
happily
6) add a test using the 'remote' enum as a row attribute.
7) Everything compiles but I see the output as above and the remote test isn't
picked up as a test.
see attached.
Looking in my installed programs I've got Gallio 3.3 build 358 installed. I'll
remove that and see if anything changes.
Original comment by paul.dam...@gmail.com
on 23 Apr 2012 at 6:49
Attachments:
So having uninstalled Gallio from the machine your solution still shows no
tests to run in (Test > Run > any option i.e. Ctrl + R, A). My solution still
shows that there are tests but when I try to run them I am told "no tests were
run because no tests are loaded or the selected tests are disabled"
Original comment by paul.dam...@gmail.com
on 23 Apr 2012 at 7:04
I've also got Resharper installed and that sees no tests...
Original comment by paul.dam...@gmail.com
on 23 Apr 2012 at 7:08
JetBrains ReSharper 6.1 Full Edition
Build 6.1.37.86 on 2011-12-20T21:15:24
Licensed to: The BMC
Plugins: none
Visual Studio 10.0.40219.1.
Original comment by paul.dam...@gmail.com
on 23 Apr 2012 at 7:13
A fresh, complete install of Gallio 3.3 Build 458 lands me back in the same
spot... this feels like I've got an unsupported setup...?
Original comment by paul.dam...@gmail.com
on 23 Apr 2012 at 7:19
I think R# 6.1 is only supported in the nightlies. We should really release
that.
I can reproduce it with the sln you provided, but I suspect it's something to
do with the VS add-in.
I'm just downloading the latest 3.3 build now, I'll give it a try with that.
What happens if you run the tests with Echo?
Original comment by grahamr...@gmail.com
on 23 Apr 2012 at 7:54
Yep, works fine and runs both tests with Echo:
Gallio Echo - Version 3.3 build 454
Get the latest version at http://www.gallio.org/
Start time: 10:04
Initializing the runtime and loading plugins.
Verifying test files.
Initializing the test runner.
Running the tests.
[inconclusive] Test AddedTestProject/UnitTest1/TestLocally/TestLocally({One})
Execute
Gallio.Framework.TestInconclusiveException: this shouldn't throw an exception
at AddedTestProject.UnitTest1.TestLocally(LocalEnum localEnum) in C:\Programm
ing\Issue858-paul\AddedTestProject\UnitTest1.cs:line 22
[inconclusive] Test AddedTestProject/UnitTest1/TestReferencedEnum/TestReferenced
Enum({One})
Execute
Gallio.Framework.TestInconclusiveException: this shouldn't throw an exception
at AddedTestProject.UnitTest1.TestReferencedEnum(ReferencedEnum referencedEnu
m) in C:\Programming\Issue858-paul\AddedTestProject\UnitTest1.cs:line 29
Disposing the test runner.
Stop time: 10:05 (Total execution time: 3.317 seconds)
2 run, 0 passed, 0 failed, 2 inconclusive, 0 skipped
Original comment by paul.dam...@gmail.com
on 24 Apr 2012 at 9:06
There are few things I want to do less, than debug the VS add-in :(
I'll try and have a look tonight. However, it's quite possible that it will not
be easily solvable. The VS test process likes to do things "differently".
Original comment by grahamr...@gmail.com
on 25 Apr 2012 at 10:26
:) Thanks
Original comment by paul.dam...@gmail.com
on 25 Apr 2012 at 10:29
Original issue reported on code.google.com by
Daniel.A...@gmail.com
on 14 Sep 2011 at 8:16