Skip to content

Commit

Permalink
Use Arcade (dotnet/extensions#586)
Browse files Browse the repository at this point in the history
Use arcade


Commit migrated from dotnet/extensions@f045899
  • Loading branch information
ryanbrandenburg committed Jan 29, 2019
1 parent 7a9b875 commit 5a99e9b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -111,9 +111,9 @@ public void TypeActivatorWorksWithCtorWithOptionalArgs_WithStructDefaults(Create
// Assert
Assert.NotNull(anotherClass);
Assert.Equal(ConsoleColor.DarkGreen, anotherClass.Color);
Assert.Equal(null, anotherClass.ColorNull);
Assert.Null(anotherClass.ColorNull);
Assert.Equal(12, anotherClass.Integer);
Assert.Equal(null, anotherClass.IntegerNull);
Assert.Null(anotherClass.IntegerNull);
}

[Theory]
Expand Down Expand Up @@ -248,7 +248,7 @@ public void TypeActivatorUsesMarkedConstructor(CreateInstanceFunc createFunc)
public void TypeActivatorThrowsOnMultipleMarkedCtors(CreateInstanceFunc createFunc)
{
// Act
var exception = Assert.Throws<InvalidOperationException>(() => CreateInstance<ClassWithMultipleMarkedCtors>(createFunc, null, "hello"));
var exception = Assert.Throws<InvalidOperationException>(() => CreateInstance<ClassWithMultipleMarkedCtors>(createFunc, null, "hello"));

// Assert
Assert.Equal("Multiple constructors were marked with ActivatorUtilitiesConstructorAttribute.", exception.Message);
Expand All @@ -259,7 +259,7 @@ public void TypeActivatorThrowsOnMultipleMarkedCtors(CreateInstanceFunc createFu
public void TypeActivatorThrowsWhenMarkedCtorDoesntAcceptArguments(CreateInstanceFunc createFunc)
{
// Act
var exception = Assert.Throws<InvalidOperationException>(() => CreateInstance<ClassWithAmbiguousCtorsAndAttribute>(createFunc, null, 0, "hello"));
var exception = Assert.Throws<InvalidOperationException>(() => CreateInstance<ClassWithAmbiguousCtorsAndAttribute>(createFunc, null, 0, "hello"));

// Assert
Assert.Equal("Constructor marked with ActivatorUtilitiesConstructorAttribute does not accept all given argument types.", exception.Message);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,10 @@
https://github.com/dotnet/corefx/issues/12338 & https://github.com/dotnet/corefx/issues/11797
-->
<EnableApiCheck>false</EnableApiCheck>
<IsUnitTestProject>false</IsUnitTestProject>
<IsTestProject>false</IsTestProject>
<TestRunnerName></TestRunnerName>
<IsPackable>true</IsPackable>
</PropertyGroup>

<ItemGroup>
Expand All @@ -22,5 +25,4 @@
<Reference Include="xunit.assert" />
<Reference Include="xunit.extensibility.core" />
</ItemGroup>

</Project>

0 comments on commit 5a99e9b

Please sign in to comment.