public void GetDateTimeFormats_should_MimicSystem()
        {
            var anyDate = new Abstractions.DateTime(2009, 7, 28, 5, 23, 15);
            var anySystemDate = new System.DateTime(anyDate.Ticks, anyDate.Kind);

            var expectedResult = anySystemDate.GetDateTimeFormats();
            // We cannot check for the exact result because it depends on the environment.

            //  Act.
            var res = anyDate.GetDateTimeFormats();

            //  Assert.
            res.Should().Equal(expectedResult);
        }
        public void GetDateTimeFormatsIFormatProvider_should_MimicSystem()
        {
            var anyDate = new Abstractions.DateTime(2009, 7, 28, 5, 23, 15);
            var anySystemDate = new System.DateTime(anyDate.Ticks, anyDate.Kind);
            System.IFormatProvider culture = new CultureInfo("fr-FR", true);

            var expectedResult = anySystemDate.GetDateTimeFormats(culture);

            //  Act.
            // Get the short date formats using the "fr-FR" culture.
            var res = anyDate.GetDateTimeFormats(culture);

            //  Assert.
            res.Should().Equal(expectedResult);
        }
        public void GetDateTimeFormatsCharIFormatProvider_should_MimicSystem()
        {
            var anyDate = new Abstractions.DateTime(2009, 7, 28, 5, 23, 15);
            var anySystemDate = new System.DateTime(anyDate.Ticks, anyDate.Kind);
            System.IFormatProvider culture = new CultureInfo("fr-FR", true);

            var expectedResult = anySystemDate.GetDateTimeFormats('d', culture);
            expectedResult.Should().Equal(new[]
            {
                "28/07/2009",
                "28/07/09",
                "28.07.09",
                "28-07-09",
                "2009-07-28",
            }, "Sanity check we have setup the test correctly");

            //  Act.
            // Get the short date formats using the "fr-FR" culture.
            var res = anyDate.GetDateTimeFormats('d', culture);

            //  Assert.
            res.Should().Equal(expectedResult);
        }