private VeryComplexClass(Random random)
        {
            Yes1 =
                Enumerable
                .Repeat(0, random.Next(1000, 1999))
                .Select(x => new ComplexClassWithInts(random.Next()))
                .ToArray();
            Yes2 = new ComplexClassWithInts(random.Next());
            Yes3 = new ComplexClassWithInts(random.Next());
            Yes4 = random.Next();
            Yes5 = random.NextDouble();
            Yes6 = random.NextEnum <SomeEnum>();
            Yes7 = Enumerable
                   .Repeat(0, random.Next(1000, 1999))
                   .Select(x => new ComplexClassWithInts(random.Next()))
                   .ToRandomEnumerable(StaticRandom);
            yeah1 = random.Next();
            yeah2 = random.NextDouble();
            yeah3 = random.NextEnum <SomeEnum>();
            yeah4 = new ComplexClassWithInts(random.Next());

            nope1 = StaticRandom.Next();
            No1   = Enumerable.Repeat(0, StaticRandom.Next(3, 15)).Select(x => new ComplexClassWithInts(StaticRandom.Next())).ToList();
            No2   = StaticRandom.NextEnum <SomeEnum>();
        }
Exemple #2
0
        public void TestMemberwiseClass(int seedX, int seedY)
        {
            ComplexClassWithInts x = new ComplexClassWithInts(new Random(seedX));
            ComplexClassWithInts y = new ComplexClassWithInts(new Random(seedY));

            Assert.Equal(x.Equals(y), LazyEqualities.LazyEquality.Equals(x, y));
        }