Add support custom max value for barcharts (#545)

This commit is contained in:
rifatx
2021-10-05 01:49:09 +03:00
committed by GitHub
parent a5716a35e2
commit fa15389158
4 changed files with 51 additions and 3 deletions

View File

@ -47,5 +47,26 @@ namespace Spectre.Console.Tests.Unit
// Then
await Verifier.Verify(console.Output);
}
[Fact]
[Expectation("Fixed_Max_Value")]
public async Task Should_Render_Correctly_3()
{
// Given
var console = new TestConsole();
// When
console.Write(new BarChart()
.Width(60)
.WithMaxValue(100)
.Label("Number of fruits")
.AddItem("Apple", 12)
.AddItem("Orange", 54)
.AddItem("Banana", 33));
// Then
await Verifier.Verify(console.Output);
}
}
}