Commit 76c2e186 authored by Nick Craver's avatar Nick Craver

More test fixes

parent 4637c100
......@@ -4,10 +4,7 @@
namespace Dapper.Tests
{
public partial class DataReaderTests : TestBase
{
[Collection("QueryCacheTests")]
public class DataReaderQueryCacheTests : TestBase
public class DataReaderTests : TestBase
{
[Fact]
public void GetSameReaderForSameShape()
......@@ -40,7 +37,6 @@ public void GetSameReaderForSameShape()
ReferenceEquals(origParser, secondParser).IsEqualTo(true);
ReferenceEquals(secondParser, thirdParser).IsEqualTo(false);
}
}
[Fact]
public void DiscriminatedUnion()
......@@ -141,18 +137,13 @@ private abstract class Discriminated_BaseType
private class Discriminated_Foo : Discriminated_BaseType
{
public string Name { get; set; }
public override int Type {
get { return 1; }
}
public override int Type => 1;
}
private class Discriminated_Bar : Discriminated_BaseType
{
public float Value { get; set; }
public override int Type
{
get { return 2; }
}
public override int Type => 2;
}
private abstract class DiscriminatedWithMultiMapping_BaseType : Discriminated_BaseType
......@@ -164,20 +155,14 @@ private class DiscriminatedWithMultiMapping_Foo : DiscriminatedWithMultiMapping_
{
public override HazNameId HazNameIdObject { get; set; }
public string Name { get; set; }
public override int Type
{
get { return 1; }
}
public override int Type => 1;
}
private class DiscriminatedWithMultiMapping_Bar : DiscriminatedWithMultiMapping_BaseType
{
public override HazNameId HazNameIdObject { get; set; }
public float Value { get; set; }
public override int Type
{
get { return 2; }
}
public override int Type => 2;
}
}
}
\ No newline at end of file
......@@ -2,7 +2,7 @@
using System.Linq;
namespace Dapper.Tests
{
[Collection("QueryCacheTests")]
[Collection(NonParallelDefinition.Name)]
public class NullTests : TestBase
{
[Fact]
......
......@@ -8,11 +8,8 @@
namespace Dapper.Tests
{
[Collection("TypeHandlerTests")]
[Collection(NonParallelDefinition.Name)]
public class TypeHandlerTests : TestBase
{
[Collection("QueryCacheTests")]
public class TypeHandlerQueryCacheTests : TestBase
{
[Fact]
public void TestChangingDefaultStringTypeMappingToAnsiString()
......@@ -96,7 +93,6 @@ public class TypeWithMapping
[Description("A")]
public string B { get; set; }
}
}
[Fact]
public void Issue136_ValueTypeHandlers()
......@@ -512,7 +508,7 @@ public void Test_RemoveTypeMap()
try
{
connection.Execute(@"INSERT INTO #Test_RemoveTypeMap VALUES (@Now)", new { DateTime.Now });
connection.Execute("INSERT INTO #Test_RemoveTypeMap VALUES (@Now)", new { DateTime.Now });
connection.Query<DateTime>("SELECT * FROM #Test_RemoveTypeMap");
dateTimeHandler.ParseWasCalled.IsTrue();
......@@ -639,7 +635,7 @@ public void Issue149_TypeMismatch_SequentialAccess()
Guid guid = Guid.Parse("cf0ef7ac-b6fe-4e24-aeda-a2b45bb5654e");
try
{
var result = connection.Query<Issue149_Person>(@"select @guid as Id", new { guid }).First();
var result = connection.Query<Issue149_Person>("select @guid as Id", new { guid }).First();
error = null;
}
catch (Exception ex)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment