Allow formatting breakdown charts with lambda expr

Relates to #252
This commit is contained in:
Patrik Svensson
2021-02-13 17:02:05 +01:00
committed by Patrik Svensson
parent 28e9c14de4
commit 102e2dc38d
6 changed files with 60 additions and 13 deletions

View File

@ -42,14 +42,14 @@ namespace Spectre.Console.Tests.Unit
[Fact]
[Expectation("TagFormat")]
public async Task Should_Render_Correctly_With_Specific_Tag_Formatter()
public async Task Should_Render_Correctly_With_Specific_Value_Formatter()
{
// Given
var console = new FakeConsole(width: 80);
var chart = Fixture.GetChart()
.Width(60)
.Culture("sv-SE")
.TagValueFormat("{0}%");
.UseValueFormatter((v, c) => string.Format(c, "{0}%", v));
// When
console.Render(chart);