Skip to content

Commit

Permalink
Passing new massive tests
Browse files Browse the repository at this point in the history
Fixes GH-2, fixes GH-3
  • Loading branch information
robdmoore committed Jul 17, 2013
1 parent 9baf4ac commit efeb8db
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 9 deletions.
8 changes: 2 additions & 6 deletions ReliableDbProvider.Tests/MassiveTests.cs
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
using System.Configuration;
using System.Data.Entity;
using System.Dynamic;
using System.Linq;
using System.Dynamic;
using Massive;
using NUnit.Framework;
using ReliableDbProvider.SqlAzureWithTimeoutRetries;
using ReliableDbProvider.Tests.Config;
using ReliableDbProvider.Tests.SqlExpress;

Expand Down Expand Up @@ -35,7 +31,7 @@ public void Insert_and_select()

table.Insert(userProperty);

var dbUser = table.Single(Id: userProperty.Id);
var dbUser = table.Single(Id: userProperty.ID);
Assert.That(dbUser.Name, Is.EqualTo(userProperty.Name));
}

Expand Down
5 changes: 2 additions & 3 deletions ReliableDbProvider/ReliableSqlClientProvider.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using System;
using System.Data.Common;
using System.Data.SqlClient;
using System.Security;
using System.Security.Permissions;
using Microsoft.Practices.EnterpriseLibrary.WindowsAzure.TransientFaultHandling.SqlAzure;
Expand Down Expand Up @@ -38,9 +39,7 @@ public object GetService(Type serviceType)

public override DbCommand CreateCommand()
{
// If I return null then the command is grabbed using the connection
// This allows for it to be wrapped by the reliable command infrastructure
return null;
return new ReliableSqlCommand(new SqlCommand());
}

#region NotSupported
Expand Down
2 changes: 2 additions & 0 deletions ReliableDbProvider/ReliableSqlCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ protected override DbConnection DbConnection
get { return Current.Connection; }
set
{
if (value == null)
return;
ReliableConnection = ((ReliableSqlDbConnection)value).ReliableConnection;
Current.Connection = ReliableConnection.Current;
}
Expand Down

0 comments on commit efeb8db

Please sign in to comment.