This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public List<UserViewModel> AllUsers() | |
{ | |
var usersViewModels = TestDataGenerator.GetTestUsers(); | |
return usersViewModels.OrderBy(uvm => uvm.Name).ToList(); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
getAllUsers = async (): Promise<UserViewModel[]> => { | |
const url = `${this.apiEndpoint}/AllUsers`; | |
const response = await fetch(url); | |
const users = (await response.json()) as UserViewModel[]; | |
return users; | |
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public record UserViewModel(Guid Id, string Name, string LastName, string Login, | |
bool IsActive, int LoyaltyPoints, AddressViewModel? Address = null); | |
// ... | |
public List<UserViewModel> AllUsers() | |
{ | |
var usersViewModels = TestDataGenerator.GetTestUsers(); | |
return usersViewModels.OrderBy(uvm => uvm.Name).ToList(); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[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) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[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) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) { } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class SQLiteInMemoryConnectionProvider : DriverConnectionProvider | |
{ | |
private static DbConnection? _connection = null; | |
public override DbConnection? GetConnection() | |
{ | |
return _connection ??= base.GetConnection(); | |
} | |
public override void CloseConnection(DbConnection conn) { } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
resolve: { | |
alias: { | |
siteCss: path.resolve(__dirname, "Content/Site.css") | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
resolve: { | |
alias: { | |
siteCss: path.resolve(__dirname, "Content/site.css") | |
} |