diff --git a/ApplicationTests/SchoolExampleTest.cs b/ApplicationTests/SchoolExampleTest.cs index c0bfc66..8b75484 100644 --- a/ApplicationTests/SchoolExampleTest.cs +++ b/ApplicationTests/SchoolExampleTest.cs @@ -46,15 +46,18 @@ public async Task InitModule() [Fact] public async Task CompileSchoolModule() { + Console.WriteLine("STARTED: CompileSchoolModule"); await Init(); project.ParseAllModules(); var ast = project.GetAstForModule("School"); Assert.True(ast.Count > 0); + Console.WriteLine("FINISHED: CompileSchoolModule"); } [Fact] public async Task RenameSchoolModule() { + Console.WriteLine("STARTED: RenameSchoolModule"); await Init(); await project.MoveModule("School", "Foo.Bar"); Assert.False(File.Exists(path("School.car")), "School.car file still exists."); @@ -64,26 +67,31 @@ public async Task RenameSchoolModule() Assert.NotNull(project.FindModule("Foo.Bar")); await Task.Run(() => Task.Delay(100)); + Console.WriteLine("FINISHED: RenameSchoolModule"); } [Fact] public async Task AddStudentModule() { + Console.WriteLine("STARTED: AddStudentModule"); await Init(); var studentModule = await project.CreateModule("Student"); var schoolModule = project.FindModule("School"); Assert.NotNull(studentModule); Assert.NotNull(schoolModule); + Console.WriteLine("FINISHED: AddStudentModule"); } [Fact] public async Task DeleteSchoolModule() { + Console.WriteLine("STARTED: DeleteSchoolModule"); await Init(); await project.DeleteModule("School"); var schoolModule = project.FindModule("School"); Assert.Null(schoolModule); + Console.WriteLine("FINISHED: DeleteSchoolModule"); } } } diff --git a/Project/FileProject.cs b/Project/FileProject.cs index 9eb9d28..1d25ed9 100644 --- a/Project/FileProject.cs +++ b/Project/FileProject.cs @@ -113,7 +113,7 @@ public async Task MoveModule(string oldName, string newName) _ = await DeleteModule(oldName); var module = await CreateModule(newName); - module.SaveCode(code); + await module.SaveCode(code); return module; }