Skip to content

Commit

Permalink
Update unit tests from mbUnit 1 to mbUnit 3. There are some basic tes…
Browse files Browse the repository at this point in the history
…t failing, I'd like to contact an active builder to see if there's anything obvious causing this.
  • Loading branch information
6pac committed Jan 26, 2011
1 parent 54f0966 commit 8ff2760
Show file tree
Hide file tree
Showing 17 changed files with 59 additions and 59 deletions.
8 changes: 4 additions & 4 deletions SubSonic.Tests/ActiveListTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public void SetUp()
/// Batches the save insert.
/// </summary>
[Test]
[RollBack]
[Rollback]
public void BatchSaveInsert()
{
ProductCollection c = CreateProductCollection();
Expand All @@ -61,7 +61,7 @@ public void BatchSaveInsert()
/// Tests deferred deletes
/// </summary>
[Test]
[RollBack]
[Rollback]
public void DeferredDelete()
{
ProductCollection c = CreateProductCollection();
Expand Down Expand Up @@ -125,7 +125,7 @@ public static bool IsUnitsEqualMinus9(Product p)
/// Batches the save update.
/// </summary>
[Test]
[RollBack]
[Rollback]
public void BatchSaveUpdate()
{
ProductCollection c = CreateProductCollection();
Expand All @@ -147,7 +147,7 @@ public void BatchSaveUpdate()
/// Batches the save update no changes.
/// </summary>
[Test]
[RollBack]
[Rollback]
public void BatchSaveUpdateNoChanges()
{
ProductCollection c = CreateProductCollection();
Expand Down
12 changes: 6 additions & 6 deletions SubSonic.Tests/ActiveRecordTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public void Setup()
/// Products_s the crud.
/// </summary>
[Test]
[RollBack]
[Rollback]
public void Products_Crud()
{
//add a new product
Expand All @@ -69,7 +69,7 @@ public void Products_Crud()
/// Products_s the null crud.
/// </summary>
[Test]
[RollBack]
[Rollback]
public void Products_NullCrud()
{
//add a new product
Expand Down Expand Up @@ -127,7 +127,7 @@ public void Products_CollectionLoad()
/// Gets the new command.
/// </summary>
[Test]
[RollBack]
[Rollback]
public void GetNewCommand()
{
Product p = CreateTestProduct();
Expand All @@ -140,7 +140,7 @@ public void GetNewCommand()
/// Gets the update command.
/// </summary>
[Test]
[RollBack]
[Rollback]
public void GetUpdateCommand()
{
Product p = CreateTestProduct();
Expand All @@ -156,7 +156,7 @@ public void GetUpdateCommand()
/// Gets the no changes command.
/// </summary>
[Test]
[RollBack]
[Rollback]
public void GetNoChangesCommand()
{
Product p = CreateTestProduct();
Expand All @@ -171,7 +171,7 @@ public void GetNoChangesCommand()
/// Saves the when not dirty.
/// </summary>
[Test]
[RollBack]
[Rollback]
public void SaveWhenNotDirty()
{
Product p = CreateTestProduct();
Expand Down
4 changes: 2 additions & 2 deletions SubSonic.Tests/AssemblyCleaner.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@
namespace SubSonic.Tests
{
/// <summary>
/// Summary for the AssemblyCleaner class
/// Summary for the AssemblyFixture class
/// </summary>
public static class AssemblyCleaner
public static class AssemblyFixture
{
/// <summary>
/// Sets the up.
Expand Down
2 changes: 1 addition & 1 deletion SubSonic.Tests/GeneratedObjectTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ public void Object_Query()
/// Object_s the CRUD.
/// </summary>
[Test]
[RollBack]
[Rollback]
public void Object_CRUD()
{
//Add a product
Expand Down
22 changes: 11 additions & 11 deletions SubSonic.Tests/Migrations/MigrationTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public void MigrationGenerateCreateTablesSql()
}

[Test]
[RollBack]
[Rollback]
public void MigrationGenerateDropTablesSql()
{
//get a table in there to drop
Expand Down Expand Up @@ -64,15 +64,15 @@ private string MigrationDirectory
}
}

[Test, RollBack]
[Test, Rollback]
public void MigrateDownFromZero()
{
Assert.AreEqual(Migrator.GetCurrentVersion("Northwind"), 0);
Migrator.Migrate("Northwind", "Migrations", -1);
Assert.AreEqual(Migrator.GetCurrentVersion("Northwind"), 0);
}

[Test,RollBack]
[Test,Rollback]
public void MigrateUpDownNegative1()
{
string p = "Northwind";
Expand All @@ -93,7 +93,7 @@ public void MigrateUpDownNegative1()
}

[Test]
[RollBack]
[Rollback]
public void MigrationUpDown()
{
Migration m = new MigrationTest001();
Expand All @@ -115,7 +115,7 @@ public void MigrationUpDown()
Assert.IsFalse(DataService.TableExists("Northwind", "ShipStatus"));
}

[Test, RollBack]
[Test, Rollback]
public void MigrationUpwithErrors()
{
//test that the two correct tables don't get added to the database
Expand All @@ -134,7 +134,7 @@ public void MigrationUpwithErrors()
}

[Test]
[RollBack]
[Rollback]
public void MigrationAlterColumn()
{
Migration m = new AlterProductNameMigration();
Expand All @@ -155,7 +155,7 @@ public void MigrationAlterColumn()
}

[Test]
[RollBack]
[Rollback]
public void MigrationAddRemoveColumns()
{
Migration m = new MigrationTest003();
Expand All @@ -168,7 +168,7 @@ public void MigrationAddRemoveColumns()
}

[Test]
[RollBack]
[Rollback]
public void MigrationShouldCreateAndDropTestTable()
{
//up
Expand All @@ -189,7 +189,7 @@ public void MigrationShouldCreateAndDropTestTable()
}

[Test]
[RollBack]
[Rollback]
public void MigrationShouldExecMultipleMigrations()
{
Migrator.Migrate("Northwind", MigrationDirectory, null);
Expand All @@ -214,7 +214,7 @@ public void MigrationShouldExecMultipleMigrations()
}

[Test]
[RollBack]
[Rollback]
public void MigrationOnDispose()
{
//testing Rob's super-cool migration on dispose pattern
Expand All @@ -232,7 +232,7 @@ public void MigrationOnDispose()
}

[Test]
[RollBack]
[Rollback]
public void MigrationExecute()
{
int expectedRegions = new Select("RegionDescription").From("Region").GetRecordCount();
Expand Down
2 changes: 1 addition & 1 deletion SubSonic.Tests/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("ea4b8fd2-de86-439d-bb50-bf9bdafa5b85")]
[assembly: MbUnit.Framework.AssemblyCleanup(typeof(SubSonic.Tests.AssemblyCleaner))]
//[assembly: MbUnit.Framework.AssemblyCleaner(typeof(SubSonic.Tests.AssemblyCleaner))]


[assembly: AssemblyProductAttribute("SubSonic.Tests")]
Expand Down
2 changes: 1 addition & 1 deletion SubSonic.Tests/QueryTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ public void Query_SelectTop()
/// Query_s the updates.
/// </summary>
[Test]
[RollBack]
[Rollback]
public void Query_Updates()
{
Query qry = new Query(Product.Schema);
Expand Down
24 changes: 12 additions & 12 deletions SubSonic.Tests/SPs.cs
Original file line number Diff line number Diff line change
Expand Up @@ -44,39 +44,39 @@ namespace SubSonic.Tests
public class SPs
{
[Test]
[RollBack]
[Rollback]
public void SP_Schema_Should_Load_10_SPs()
{
List<StoredProcedure> sps = DataService.GetSPSchemaCollection("Northwind");
Assert.AreEqual(10, sps.Count);
}

[Test]
[RollBack]
[Rollback]
public void SP_Schema_Should_Load_With_Schema_Name()
{
List<StoredProcedure> sps = DataService.GetSPSchemaCollection("Northwind");
Assert.AreEqual("dbo", sps[0].SchemaName);
}

[Test]
[RollBack]
[Rollback]
public void SP_CustOrderHist_Should_Have_QualifiedName()
{
List<StoredProcedure> sps = DataService.GetSPSchemaCollection("Northwind");
Assert.AreEqual("[dbo].[CustOrderHist]", sps[0].QualifiedName);
}

[Test]
[RollBack]
[Rollback]
public void SP_CustOrderHist_Should_Have_Qualified_CommandSQL()
{
List<StoredProcedure> sps = DataService.GetSPSchemaCollection("Northwind");
Assert.AreEqual("[dbo].[CustOrderHist]", sps[0].Command.CommandSql);
}

[Test]
[RollBack]
[Rollback]
public void SP_CustOrderHist_TypedSP_Should_Have_Qualified_CommandSQL()
{
StoredProcedure sp = Northwind.SPs.CustOrderHist("ALFKI").GetBuiltProcedure();
Expand All @@ -87,7 +87,7 @@ public void SP_CustOrderHist_TypedSP_Should_Have_Qualified_CommandSQL()
/// Ss the p_ reader test.
/// </summary>
[Test]
[RollBack]
[Rollback]
public void SP_ReaderTest()
{
StoredProcedure sp = new StoredProcedure("CustOrderHist", DataService.GetInstance("Northwind"));
Expand All @@ -107,7 +107,7 @@ public void SP_ReaderTest()
/// Ss the p_ scalar test.
/// </summary>
[Test]
[RollBack]
[Rollback]
public void SP_ScalarTest()
{
StoredProcedure sp = new StoredProcedure("CustOrderHist", DataService.GetInstance("Northwind"));
Expand All @@ -121,7 +121,7 @@ public void SP_ScalarTest()
/// Ss the p_ DS test.
/// </summary>
[Test]
[RollBack]
[Rollback]
public void SP_DSTest()
{
StoredProcedure sp = new StoredProcedure("CustOrderHist", DataService.GetInstance("Northwind"));
Expand All @@ -135,7 +135,7 @@ public void SP_DSTest()
/// Ss the p_ outputs.
/// </summary>
[Test]
[RollBack]
[Rollback]
public void SP_Outputs()
{
StoredProcedure sp = new StoredProcedure("SubSonicTest", DataService.GetInstance("Northwind"));
Expand All @@ -155,7 +155,7 @@ public void SP_Outputs()
/// Ss the p_ outputs_ default provider.
/// </summary>
[Test]
[RollBack]
[Rollback]
public void SP_Outputs_DefaultProvider()
{
StoredProcedure sp = new StoredProcedure("SubSonicTestNW", DataService.GetInstance("Northwind"));
Expand All @@ -175,7 +175,7 @@ public void SP_Outputs_DefaultProvider()
/// Ss the p_ quick reader.
/// </summary>
[Test]
[RollBack]
[Rollback]
public void SP_QuickReader()
{
int count = 0;
Expand All @@ -192,7 +192,7 @@ public void SP_QuickReader()
/// Ss the p_ quick data set.
/// </summary>
[Test]
[RollBack]
[Rollback]
public void SP_QuickDataSet()
{
DataSet ds = StoredProcedure.GetDataSet("CustOrderHist 'ALFKI'");
Expand Down
4 changes: 2 additions & 2 deletions SubSonic.Tests/ScriptersTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public class ScriptersTest
/// Script_s the data.
/// </summary>
[Test]
[RollBack]
[Rollback]
public void Script_Data()
{
string sql = DataService.ScriptData("Categories", "Northwind");
Expand All @@ -55,7 +55,7 @@ public void Script_Data()
/// Script_s all data.
/// </summary>
[Test]
[RollBack]
[Rollback]
public void Script_AllData()
{
string sql = DataService.ScriptData("Northwind");
Expand Down
6 changes: 3 additions & 3 deletions SubSonic.Tests/SqlGenerators/SqlServerGeneratorTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -161,15 +161,15 @@ public void Select_Paged()
.Paged(1, 20);

ProductCollection pc = q.ExecuteAsCollection<ProductCollection>();
Assert.GreaterEqualThan(pc.Count, 1);
Assert.GreaterThanOrEqualTo(pc.Count, 1);

SubSonic.SqlQuery q2 = new SubSonic.SqlQuery().From(Product.Schema)
.InnerJoin(Category.Schema)
.Where("productid").IsLessThan(10)
.Paged(1, 20);

ProductCollection pc2 = q2.ExecuteAsCollection<ProductCollection>();
Assert.GreaterEqualThan(pc2.Count, 1);
Assert.GreaterThanOrEqualTo(pc2.Count, 1);

}

Expand Down Expand Up @@ -272,5 +272,5 @@ public void Remove_Column()
string sql = gen.BuildDropColumnStatement(productSchema, column);
Assert.AreEqual("ALTER TABLE [dbo].[Products] DROP COLUMN [ProductName]", sql);
}
}
}
}
2 changes: 1 addition & 1 deletion SubSonic.Tests/SqlQuery/AggregateTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ public void Exec_AggregateMin()
[Test]
public void Exec_AggregateStandardDeviation()
{
const double expected = 42.7698669325723;
const double expected = 42.769866932572263;

// overload #1
double result = new
Expand Down
Loading

0 comments on commit 8ff2760

Please sign in to comment.