public void Locate_GetIndirectlyTaggedMigrations() { var sut = new DefaultMigrationLocator(); var result = sut.LocateAll <BAMigration>(); Assert.Contains(typeof(B1Migration), result); }
public void Locate_IgnoreAbstractMigrations() { var sut = new DefaultMigrationLocator(); var result = sut.LocateAll <Migration>(); Assert.DoesNotContain(typeof(AMigration), result); }
public void Locate_OnlyReturnDirectInheritance() { var sut = new DefaultMigrationLocator(); var result = sut.LocateAll <Migration>(); Assert.DoesNotContain(typeof(A1Migration), result); }
public void Locate_AllDirectlyInheritingMigrations() { var sut = new DefaultMigrationLocator(); var result = sut.LocateAll <Migration>(); Assert.Contains(typeof(TestMigration), result); }
public void Locate_GetTaggedMigrationsButNotOtherTags() { var sut = new DefaultMigrationLocator(); var result = sut.LocateAll <AMigration>(); Assert.Contains(typeof(A1Migration), result); Assert.DoesNotContain(typeof(B1Migration), result); }
public void Locate_OrderByClassNameIfNoAttribute() { var sut = new DefaultMigrationLocator(); var result = sut.LocateAll <BAMigration>().ToList(); var expected = new List <Type> { typeof(B1Migration), typeof(BA1Migration), typeof(DoNotCommitMigration), typeof(TestMigration) }; Assert.Equal(expected, result); }