Skip to content

Commit

Permalink
Fixes #671
Browse files Browse the repository at this point in the history
  • Loading branch information
fubar-coder committed May 4, 2018
1 parent 69cdaaf commit dc50224
Show file tree
Hide file tree
Showing 125 changed files with 868 additions and 76 deletions.
@@ -1,3 +1,21 @@
#region License
//
// Copyright (c) 2018, Fluent Migrator Project
//
// Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
#endregion

using System;
using System.Collections.Generic;
using System.Linq;
Expand Down
Expand Up @@ -19,6 +19,7 @@

using System;
using System.Linq;

using FluentMigrator.Exceptions;
using FluentMigrator.Expressions;

Expand Down
Expand Up @@ -42,6 +42,7 @@

namespace FluentMigrator.Tests.Integration
{
[Category("Integration")]
public class IntegrationTestBase
{
private readonly List<(Type processorType, Func<IntegrationTestOptions.DatabaseServerOptions> getOptionsFunc)> _processors;
Expand Down
2 changes: 2 additions & 0 deletions test/FluentMigrator.Tests/MigrationValidatorTests.cs
Expand Up @@ -23,11 +23,13 @@
using Microsoft.Extensions.Logging;

using Moq;

using NUnit.Framework;

namespace FluentMigrator.Tests
{
[TestFixture]
[Category("Validation")]
public class MigrationValidatorTests
{
[SetUp]
Expand Down
Expand Up @@ -17,11 +17,13 @@
#endregion

using FluentMigrator.Runner.Initialization.AssemblyLoader;

using NUnit.Framework;

namespace FluentMigrator.Tests.Unit.AssemblyLoader
{
[TestFixture]
[Category("AssemblyLoader")]
public class AssemblyLoaderTests
{
private AssemblyLoaderFactory _assemblyLoaderFactory;
Expand Down
Expand Up @@ -29,6 +29,7 @@
namespace FluentMigrator.Tests.Unit
{
[TestFixture]
[Category("Migration")]
public class AutoReversingMigrationTests
{
private Mock<IMigrationContext> _context;
Expand All @@ -47,7 +48,7 @@ public void CreateTableUpAutoReversingMigrationGivesDeleteTableDown()
_context.Object.Expressions = new Collection<IMigrationExpression>();
autoReversibleMigration.GetDownExpressions(_context.Object);

Assert.True(_context.Object.Expressions.Any(me => me is DeleteTableExpression && ((DeleteTableExpression)me).TableName == "Foo"));
Assert.True(_context.Object.Expressions.Any(me => me is DeleteTableExpression expression && expression.TableName == "Foo"));
}

[Test]
Expand Down
Expand Up @@ -27,6 +27,7 @@

namespace FluentMigrator.Tests.Unit.BatchParser
{
[Category("BatchParser")]
public class RangeSearcherTests
{
[TestCase(typeof(AnsiSqlIdentifier), 1, 1)]
Expand Down
Expand Up @@ -37,6 +37,8 @@
namespace FluentMigrator.Tests.Unit.Builders.Alter
{
[TestFixture]
[Category("Builder")]
[Category("AlterColumn")]
public class AlterColumnExpressionBuilderTests
{
private void VerifyColumnProperty(Action<ColumnDefinition> columnExpression, Action<AlterColumnExpressionBuilder> callToTest)
Expand Down
@@ -1,7 +1,7 @@
#region License
//
//
// Copyright (c) 2007-2018, Sean Chambers <schambers80@gmail.com>
//
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
Expand All @@ -17,19 +17,24 @@
#endregion

using System.Collections.Generic;

using FluentMigrator.Builders.Alter;
using FluentMigrator.Builders.Alter.Column;
using FluentMigrator.Builders.Alter.Table;
using FluentMigrator.Expressions;
using FluentMigrator.Infrastructure;

using Moq;

using NUnit.Framework;

using Shouldly;

namespace FluentMigrator.Tests.Unit.Builders.Alter
{
[TestFixture]
[Category("Builder")]
[Category("RootAlter")]
public class AlterExpressionRootTests
{
[Test]
Expand Down Expand Up @@ -96,4 +101,4 @@ public void CallingColumnReturnsAlterColumnExpression()
contextMock.VerifyGet(x => x.Expressions);
}
}
}
}
Expand Up @@ -38,6 +38,8 @@
namespace FluentMigrator.Tests.Unit.Builders.Alter
{
[TestFixture]
[Category("Builder")]
[Category("AlterTable")]
public class AlterTableExpressionBuilderTests
{
[Test]
Expand Down
@@ -1,18 +1,41 @@
#region License
//
// Copyright (c) 2018, Fluent Migrator Project
//
// Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
#endregion

using System;
using System.Collections.Generic;
using System.Linq;

using FluentMigrator.Builders;
using FluentMigrator.Expressions;
using FluentMigrator.Infrastructure;
using FluentMigrator.Model;

using Moq;

using NUnit.Framework;
using System;
using System.Collections.Generic;
using System.Linq;

using JetBrains.Annotations;

namespace FluentMigrator.Tests.Unit.Builders
{
[TestFixture]
[Category("Builder")]
[Category("Definition")]
public class ColumnExpressionBuilderHelperTests
{
[Test]
Expand Down
Expand Up @@ -29,13 +29,16 @@
using FluentMigrator.SqlServer;

using Moq;

using NUnit.Framework;

using Shouldly;

namespace FluentMigrator.Tests.Unit.Builders.Create
{
[TestFixture]
[Category("Builder")]
[Category("CreateColumn")]
public class CreateColumnExpressionBuilderTests
{
[Test]
Expand Down
Expand Up @@ -25,13 +25,16 @@
using FluentMigrator.SqlServer;

using Moq;

using NUnit.Framework;

using Shouldly;

namespace FluentMigrator.Tests.Unit.Builders.Create
{
[TestFixture]
[Category("Builder")]
[Category("CreateConstraint")]
public class CreateConstraintExpressionBuilderTests
{
private const string TableName = "Bacon";
Expand Down
@@ -1,7 +1,7 @@
#region License
//
//
// Copyright (c) 2007-2018, Sean Chambers <schambers80@gmail.com>
//
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
Expand All @@ -17,6 +17,7 @@
#endregion

using System.Collections.Generic;

using FluentMigrator.Builders.Create;
using FluentMigrator.Builders.Create.Column;
using FluentMigrator.Builders.Create.Constraint;
Expand All @@ -25,7 +26,9 @@
using FluentMigrator.Builders.Create.Table;
using FluentMigrator.Expressions;
using FluentMigrator.Infrastructure;

using Moq;

using NUnit.Framework;

using Shouldly;
Expand All @@ -35,6 +38,8 @@ namespace FluentMigrator.Tests.Unit.Builders.Create
using FluentMigrator.Builders.Create.Sequence;

[TestFixture]
[Category("Builder")]
[Category("RootCreate")]
public class CreateExpressionRootTests
{
[Test]
Expand Down Expand Up @@ -304,4 +309,4 @@ public void CallingUniqueConstraintReturnsCreateColumnExpression()
contextMock.VerifyGet(x => x.Expressions);
}
}
}
}
Expand Up @@ -18,15 +18,20 @@

using System.Collections.Generic;
using System.Data;

using FluentMigrator.Builders.Create.ForeignKey;
using FluentMigrator.Expressions;
using FluentMigrator.Model;

using Moq;

using NUnit.Framework;

namespace FluentMigrator.Tests.Unit.Builders.Create
{
[TestFixture]
[Category("Builder")]
[Category("CreateForeignKey")]
public class CreateForeignKeyExpressionBuilderTests
{
[Test]
Expand Down
Expand Up @@ -30,6 +30,8 @@
namespace FluentMigrator.Tests.Unit.Builders.Create
{
[TestFixture]
[Category("Builder")]
[Category("CreateIndex")]
public class CreateIndexExpressionBuilderTests
{
[Test]
Expand Down
@@ -1,7 +1,7 @@
#region License
//
//
// Copyright (c) 2007-2018, Sean Chambers <schambers80@gmail.com>
//
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
Expand All @@ -17,16 +17,21 @@
#endregion

using System;

using FluentMigrator.Expressions;
using FluentMigrator.Model;

using Moq;

using NUnit.Framework;

namespace FluentMigrator.Tests.Unit.Builders.Create
{
using FluentMigrator.Builders.Create.Sequence;

[TestFixture]
[Category("Builder")]
[Category("CreateSequence")]
public class CreateSequenceExpressionBuilderTests
{
[Test]
Expand Down Expand Up @@ -86,4 +91,4 @@ private void VerifySequenceProperty(Action<SequenceDefinition> sequenceExpressio
sequenceMock.VerifySet(sequenceExpression);
}
}
}
}
Expand Up @@ -37,6 +37,8 @@
namespace FluentMigrator.Tests.Unit.Builders.Create
{
[TestFixture]
[Category("Builder")]
[Category("CreateTable")]
public class CreateTableExpressionBuilderTests
{
[Test]
Expand Down
Expand Up @@ -18,14 +18,19 @@

using System.Collections.Generic;
using System.Linq;

using FluentMigrator.Builders.Delete.Column;
using FluentMigrator.Expressions;

using Moq;

using NUnit.Framework;

namespace FluentMigrator.Tests.Unit.Builders.Delete
{
[TestFixture]
[Category("Builder")]
[Category("DeleteColumn")]
public class DeleteColumnExpressionBuilderTests
{
[Test]
Expand Down

0 comments on commit dc50224

Please sign in to comment.