public void FormatsDefinitions() { var expected = File.ReadAllText("Apps/ExampleApp.d.json"); var formatted = new StringWriter(); AppDefinitionFormatter.FormatAppDefinition(typeof(ExampleApp), true, formatted); Assert.Equal(Normalize(expected), Normalize(formatted.ToString())); }
protected override Task <int> Run() { using var appLoader = new AppLoader(_dir); if (!appLoader.TryLoadSeqAppType(_type, out var seqAppType)) { Console.Error.WriteLine("No type marked with `[SeqApp]` could be found."); return(Task.FromResult(1)); } AppDefinitionFormatter.FormatAppDefinition(seqAppType, _indented, Console.Out); return(Task.FromResult(0)); }