using Ludarium.Application; namespace Ludarium.UnitTests; public sealed class DashboardSummaryTests { [Fact] public void ConfidenceIsUnknownWithoutPresentArtifacts() { Assert.Null(Summary(0, 0, 0).ConfidencePercent); } [Theory] [InlineData(100, 100, 100, 100)] [InlineData(100, 50, 50, 50)] [InlineData(4, 3, 2, 62.5)] public void ConfidenceUsesOnlyMeasuredEvidence(long present, long hashed, long recognized, decimal expected) { Assert.Equal(expected, Summary(present, hashed, recognized).ConfidencePercent); } private static DashboardSummary Summary(long present, long hashed, long recognized) => new(0, present, present, 0, 0, 0, 0, hashed, recognized, 0, 0, 0, 0, 0, 0, 0, 0); }