public IGen <Test> ItRendersDateUsingTheCurrentCulture() => from value in Gen.DateTime() select Property.ForThese(() => { var rendering = ExampleRenderer.Render(new object[] { value }).Single(); rendering.Should().Be(value.ToString(CultureInfo.CurrentCulture)); });
public void Values() { var sample = Gen .DateTime() .Select(x => x.ToString("s")) .Sample(seed: 0); var nameExtension = string.Join("_", new[] { $"Seed_{0}" }); Snapshot.Match(sample, SnapshotNameExtension.Create(nameExtension)); }
public void ExampleSpaces() { var seeds = Enumerable.Range(0, 3); foreach (var seed in seeds) { var sample = Gen.DateTime().RenderOneTraversal( seed: seed, size: 75, renderer: x => x.ToString("s")); var nameExtension = string.Join("_", new[] { $"Seed_{seed}" }); Snapshot.Match(sample, SnapshotNameExtension.Create(nameExtension)); } }