Repository: dotnet/efcore
File: test/Microsoft.Data.Sqlite.Tests/SqliteDataReaderTest.cs (C#)

Code before:

            connection.ExecuteNonQuery("CREATE TABLE Data (Value); INSERT INTO Data VALUES ('test');");

            using (var reader = connection.ExecuteReader("SELECT rowid, Value FROM Data;"))
            {
                var hasData = reader.Read();
                Assert.True(hasData);

                using (var textReader = reader.GetTextReader(1))
                {
                    Assert.IsType<SqliteBlob>(Assert.IsType<StreamReader>(textReader).BaseStream);
                    Assert.Equal("test", textReader.ReadToEnd());
                }
            }
        }
    }

    [Fact]
    public void GetDateTime_works_with_text()
        => GetX_works(
            "SELECT '2014-04-15 10:47:16';",
            r => r.GetDateTime(0),
            new DateTime(2014, 4, 15, 10, 47, 16));

    [Fact]
    public void GetDateTime_works_with_text_Kind()
        => GetX_works(
            "SELECT '2014-04-15 10:47:16';",
            r => r.GetDateTime(0).Kind,
            DateTimeKind.Unspecified);

    [Fact]
    public void GetDateTime_works_with_text_with_tz()
        => GetX_works(
            "SELECT '2014-04-15 10:47:16+03:00';",
            r => r.GetDateTime(0),
            new DateTime(2014, 4, 15, 7, 47, 16));

    [Fact]
    public void GetDateTime_works_with_text_with_tz_Kind()
        => GetX_works(
            "SELECT '2014-04-15 10:47:16+03:00';",
            r => r.GetDateTime(0).Kind,
            DateTimeKind.Utc);

    [Fact]
    public void GetDateTime_works_with_real()
        => GetX_works(
            "SELECT julianday('2013-10-07 08:23:19.120');",
            r => r.GetDateTime(0),
            new DateTime(2013, 10, 7, 8, 23, 19, 120));

Review comment (suggestion):
Consider test names that are a bit more descriptive of what is being checked, e.g.:

```suggestion
    public void GetDateTime_returns_Unspecified_Kind_for_text_without_offset()
```

Code after:
            connection.Open();

            connection.ExecuteNonQuery("CREATE TABLE Data (Value); INSERT INTO Data VALUES ('test');");

            using (var reader = connection.ExecuteReader("SELECT rowid, Value FROM Data;"))
            {
                var hasData = reader.Read();
                Assert.True(hasData);

                using (var textReader = reader.GetTextReader(1))
                {
                    Assert.IsType<SqliteBlob>(Assert.IsType<StreamReader>(textReader).BaseStream);
                    Assert.Equal("test", textReader.ReadToEnd());
                }
            }
        }
    }

    [Fact]
    public void GetDateTime_works_with_text()
        => GetX_works(
            "SELECT '2014-04-15 10:47:16';",
            r => r.GetDateTime(0),
            new DateTime(2014, 4, 15, 10, 47, 16),
            a => Assert.Equal(DateTimeKind.Unspecified, a.Kind));

    [Fact]
    public void GetDateTime_works_with_text_with_offset()
        => GetX_works(
            "SELECT '2014-04-15 10:47:16+03:00';",
            r => r.GetDateTime(0),
            new DateTime(2014, 4, 15, 7, 47, 16),
            a => Assert.Equal(DateTimeKind.Utc, a.Kind));

    [Fact]
    public void GetDateTime_works_with_real()
        => GetX_works(
            "SELECT julianday('2013-10-07 08:23:19.120');",
            r => r.GetDateTime(0),
            new DateTime(2013, 10, 7, 8, 23, 19, 120),
            a => Assert.Equal(DateTimeKind.Unspecified, a.Kind));

    [Fact]
    public void GetDateTime_works_with_integer()
        => GetX_works(
            "SELECT CAST(julianday('2013-10-07 12:00') AS INTEGER);",
            r => r.GetDateTime(0),
            new DateTime(2013, 10, 7, 12, 0, 0),
            a => Assert.Equal(DateTimeKind.Unspecified, a.Kind));

    [Fact]