public void CanUseSingleSelectQueryExpression() { var g = from x in RNG.RawBits select x + 1uL; var actual = RandomModule.Get(g, UtilityModule.DefaultState); var expected = RandomModule.Get(RNG.RawBits, UtilityModule.DefaultState) + 1uL; Assert.That(actual, Is.EqualTo(expected)); }
public void CanUseSelectManyQueryExpression() { var g = from x in RNG.RawBits from y in RNG.RawBits let z = x ^ y select z + 1uL; var actual = RandomModule.Get(g, UtilityModule.DefaultState); var expectedX = RandomModule.Next(RNG.RawBits, UtilityModule.DefaultState); var expectedY = RandomModule.Next(RNG.RawBits, expectedX.Item2); Assert.That(actual, Is.EqualTo((expectedX.Item1 ^ expectedY.Item1) + 1uL)); }