OpenSource » Database Migrator » Legacy Migrator
Clone URL:  

Migrator Removed this useless file.

Changeset f75d4479e2dd

Parent d1965f8809dd

by jasoncline

Changes to one file · Browse files at f75d4479e2dd Showing diff from parent d1965f8809dd Diff from another changeset...

Change 1 of 1 Show Entire File test/​MigrationTestCase.cs Stacked
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
@@ -1,60 +0,0 @@
-#region License -//The contents of this file are subject to the Mozilla Public License -//Version 1.1 (the "License"); you may not use this file except in -//compliance with the License. You may obtain a copy of the License at -//http://www.mozilla.org/MPL/ -//Software distributed under the License is distributed on an "AS IS" -//basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the -//License for the specific language governing rights and limitations -//under the License. -#endregion -using System.Reflection; -using NUnit.Framework; -using Migrator.Providers; -using Migrator.Providers.Tests; - -namespace Migrator.Tests -{ - /// <summary> - /// Extend this classe to test your migrations - /// </summary> - public abstract class MigrationsTestCase - { - private Migrator _migrator; - - protected abstract TransformationProvider TransformationProvider { get; } - protected abstract string ConnectionString { get; } - protected abstract Assembly MigrationAssembly { get; } - - [SetUp] - public void SetUp() - { - TransformationProviderTestAdapter adapter = - new TransformationProviderTestAdapter(TransformationProvider); - _migrator = new Migrator(adapter, MigrationAssembly, true); - - Assert.IsTrue(_migrator.MigrationsTypes.Count > 0, "No migrations in assembly " + MigrationAssembly.Location); - - _migrator.MigrateTo(0); - } - - [TearDown] - public void TearDown() - { - _migrator.MigrateTo(0); - } - - [Test] - public void Up() - { - _migrator.MigrateToLastVersion(); - } - - [Test] - public void Down() - { - _migrator.MigrateToLastVersion(); - _migrator.MigrateTo(0); - } - } -}