Skip to content

Instantly share code, notes, and snippets.

Avatar

Dawid Sibiński dsibinski

View GitHub Profile
View NUnit_test_progress.cs
[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)
View NUnit_test_progress_todo.cs
[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)
View SQLiteInMemoryConnectionProviderAsync_correct.cs
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)
View SQLiteInMemoryConnectionProviderAsync.cs
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) { }
View SQLiteInMemoryConnectionProvider.cs
public class SQLiteInMemoryConnectionProvider : DriverConnectionProvider
{
private static DbConnection? _connection = null;
public override DbConnection? GetConnection()
{
return _connection ??= base.GetConnection();
}
public override void CloseConnection(DbConnection conn) { }
View webpack_alias_correct_casing.js
resolve: {
alias: {
siteCss: path.resolve(__dirname, "Content/Site.css")
}
View webpack_alias_wrong_casing.js
resolve: {
alias: {
siteCss: path.resolve(__dirname, "Content/site.css")
}
View import_with_correct_casing.ts
import QuestionnaireCorrectTemplate from "./questionnaireCorrectTemplate";
View import_with_wrong_casing.ts
import QuestionnaireCorrectTemplate from "./QuestionnaireCorrectTemplate";
View webpack_watch_package.json
"scripts": {
"build:dev:watch": "webpack --watch --config webpack.config.dev.js NODE_ENV=development"
}