public async Task DI_VerifyModelBuilderInnerHandlers_ToRC2() { var names = await RestierTestHelpers.GetModelBuilderHierarchy <LibraryApi, LibraryContext>(); names.Should().NotBeNull(); var result = string.Join(Environment.NewLine, names); result.Should().NotBeNullOrWhiteSpace(); var baseline = File.ReadAllText("..//..//..//..//Microsoft.Restier.Tests.AspNet//Baselines/RC2-ModelBuilder-InnerHandlers.txt"); baseline = baseline.Replace("Model.Restier", "Model.RestierWebApi").Replace("EFModelProducer", typeof(EF6ModelBuilder).Name); result.Should().Be(baseline); }
public async Task IModelBuilder_LogChildren(string projectPath) { //var projectPath = "..//..//..//"; var result = await RestierTestHelpers.GetModelBuilderHierarchy <LibraryApi, LibraryContext>(); var fullPath = Path.Combine(projectPath, "Baselines//RC6-ModelBuilder-InnerHandlers.txt"); Console.WriteLine(fullPath); if (!Directory.Exists(Path.GetDirectoryName(fullPath))) { Directory.CreateDirectory(Path.GetDirectoryName(fullPath)); } File.WriteAllText(fullPath, string.Join(Environment.NewLine, result)); Console.WriteLine($"File exists: {File.Exists(fullPath)}"); }