From 535e5d6a2696a9a84f08d3a8b83a10b5797ce1ce Mon Sep 17 00:00:00 2001 From: Baudin999 Date: Thu, 26 Dec 2019 11:52:32 +0100 Subject: [PATCH] Naming the different tests --- ApplicationTests/SchoolExampleTest.cs | 8 ++++++++ Project/FileProject.cs | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) 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; }