void CalculateProbabilities() { var groups = Digits.GroupBy(i => i); foreach (var group in groups) { InputProbabilities.Add(Math.Round((double)group.Count() / Digits.Count(), 4) * 100); } }
public override bool IsValid() { return(Digits.Any(digit => Digits.Count(i => i == digit) == 2)); }
public void Count_ShouldReturnNumberOfDigits_IfFloat(float number, int count) => Assert.Equal(count, Digits.Count(number));
public void Count_ShouldReturnNumberOfDigits_IfLong(long number, int count) => Assert.Equal(count, Digits.Count(number));