Skip to content

Instantly share code, notes, and snippets.

View dsibinski's full-sized avatar

Dawid Sibiński dsibinski

View GitHub Profile
[TestFixture]
public class MyTests
{
[Test]
public void SampleTest()
{
// some operations here, like starting a server for tests in-memory...
TestContext.Progress.WriteLine("The server is running now! You can reach it on https://localhost:8067/");
while (true)
[TestFixture]
public class MyTests
{
[Test]
public void SampleTest()
{
// some operations here, like starting a server for tests in-memory...
// TODO: inform the 'user' (the one who runs the test) that the server is already running
while (true)
public class SQLiteInMemoryConnectionProvider : DriverConnectionProvider
{
private static DbConnection? _connection = null;
public override DbConnection GetConnection()
{
return _connection ??= base.GetConnection();
}
public override async Task<DbConnection> GetConnectionAsync(CancellationToken cancellationToken)
public class SQLiteInMemoryConnectionProvider : DriverConnectionProvider
{
private AsyncLocal<DbConnection> _connection = new AsyncLocal<DbConnection>();
public override DbConnection? GetConnection()
{
return _connection.Value ??= base.GetConnection();
}
public override void CloseConnection(DbConnection conn) { }
public class SQLiteInMemoryConnectionProvider : DriverConnectionProvider
{
private static DbConnection? _connection = null;
public override DbConnection? GetConnection()
{
return _connection ??= base.GetConnection();
}
public override void CloseConnection(DbConnection conn) { }
resolve: {
alias: {
siteCss: path.resolve(__dirname, "Content/Site.css")
}
resolve: {
alias: {
siteCss: path.resolve(__dirname, "Content/site.css")
}
import QuestionnaireCorrectTemplate from "./questionnaireCorrectTemplate";
import QuestionnaireCorrectTemplate from "./QuestionnaireCorrectTemplate";
"scripts": {
"build:dev:watch": "webpack --watch --config webpack.config.dev.js NODE_ENV=development"
}