private static void RandomizeTestBase <T, TKey>(T entity) where T : BaseTestEntity <TKey>, new() { if (entity.Decimal == 0) { entity.Decimal = _rand.RandomDecimal(); } if (string.IsNullOrEmpty(entity.Name)) { entity.Name = _rand.RandomString(); } if (entity.Integer == 0) { entity.Integer = _rand.RandomInt(); } }
public void RandomDecimal_Passes_Random_Sample_Test() { TestRandomSample( () => _sut.RandomDecimal(), (a, b) => a.Equals(b)); }