/
githubmirror
/
aspnetcore
Обзор
Документация
Войти
/
githubmirror
/
aspnetcore
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
src/Http/Http.Results/test/ResultsCacheTests.cs
24 строки
902 B
Damian Edwards
Add TypedResults static factory class for creating typed IResult objects (#41161)
19 апр 2022, 02:21
Не верифицирован
19 апр 2022, 02:21
64ccf82
Код
Авторство
О чём код?
// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. namespace Microsoft.AspNetCore.Http.HttpResults; using Mono.TextTemplating; public class ResultsCacheTests { [Fact] public void GeneratedCodeIsUpToDate() { var currentContentPath = Path.Combine(AppContext.BaseDirectory, "Shared", "GeneratedContent", "ResultsCache.StatusCodes.cs"); var templatePath = Path.Combine(AppContext.BaseDirectory, "Shared", "GeneratedContent", "ResultsCache.StatusCodes.tt"); var generator = new TemplateGenerator(); var compiledTemplate = generator.CompileTemplate(File.ReadAllText(templatePath)); var generatedContent = compiledTemplate.Process(); var currentContent = File.ReadAllText(currentContentPath); Assert.Equal(currentContent, generatedContent); } }