Пример #1
0
        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();
            }
        }
Пример #2
0
 public void RandomInt_Passes_Random_Sample_Test()
 {
     TestRandomSample(
         () => _sut.RandomInt(),
         (a, b) => a.Equals(b));
 }