public void OpenConnection() { var session = new SqlSession(ConnectionStrings.AlenosoftTestDb); using (session.OpenConnectionAsync().GetAwaiter().GetResult()) { Assert.Equal(ConnectionState.Open, session.ConnectionState); var date = (DateTime)session.ExecuteScalarAsync(new SqlCommand(@"SELECT CONVERT(DATETIME, '01-01-3000', 105)")).GetAwaiter().GetResult(); Assert.Equal(date, new DateTime(3000, 01, 01)); Assert.Equal(ConnectionState.Open, session.ConnectionState); } Assert.Equal(ConnectionState.Closed, session.ConnectionState); }