public void ExternalIdConflictImport_Abort() { CreateFakeLevel("testlevel", null); FileManagement.ImportDirectory(new DirectoryInfo(tempPath)); Level oldLevel = LevelQuery.List().First(); CreateFakeLevel("testlevel", null, "", "newSong"); FileManagement.ImportDirectory(new DirectoryInfo(tempPath)); FileManagement.Cleanup(); IEnumerable <Level> levels = LevelQuery.List(); int count = levels.Count(); if (count != 1) { Assert.Fail($"Expected 1 levels but {count} exists"); } Level level = levels.First(); Assert.AreEqual(level.Charts[0].Name, "testsong"); }