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 RandomInt_Passes_Random_Sample_Test() { TestRandomSample( () => _sut.RandomInt(), (a, b) => a.Equals(b)); }