ajout du boardlayout et de la commande getmatch
This commit was merged in pull request #8.
This commit is contained in:
@@ -3,10 +3,20 @@ namespace Giants.Core.Tests;
|
||||
using Giants.Application;
|
||||
using Giants.Core.Commands;
|
||||
using Giants.Core.Interfaces;
|
||||
using Giants.Infrastructure;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
|
||||
public class ApplicationTests
|
||||
{
|
||||
private readonly IMatchRepository _repo;
|
||||
|
||||
public ApplicationTests()
|
||||
{
|
||||
IHexagonalGrid _grid = new HexagonalGridImpl();
|
||||
BoardLayout layout = new BoardLayout(_grid);
|
||||
_repo = new MatchRepositoryMock(layout);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void ApplicationCreationExample()
|
||||
{
|
||||
@@ -17,10 +27,8 @@ public class ApplicationTests
|
||||
public void TryingServiceInjection()
|
||||
{
|
||||
// creation des instances
|
||||
IMatchRepository matchRepository = new MatchRepositoryMock();
|
||||
|
||||
var serviceCollection = new ServiceCollection();
|
||||
serviceCollection.AddScoped(repo => matchRepository);
|
||||
serviceCollection.AddScoped(repo => _repo);
|
||||
|
||||
// Ajout des commandes disponibles
|
||||
serviceCollection.AddScoped<NewMatchCommand>();
|
||||
|
||||
Reference in New Issue
Block a user