Compare commits
111 Commits
Author | SHA1 | Date |
---|---|---|
|
66f8b15a63 | 3 years ago |
![]() |
e498d16b47 | 3 years ago |
![]() |
fb2f4d1d71 | 3 years ago |
![]() |
ba6a3cb784 | 3 years ago |
![]() |
08e536d6da | 3 years ago |
![]() |
03cbcdb149 | 3 years ago |
![]() |
d42752c396 | 3 years ago |
![]() |
1c4d77aed6 | 3 years ago |
|
3618f792a0 | 3 years ago |
![]() |
9e01ee3fd3 | 3 years ago |
|
0734f42db5 | 3 years ago |
![]() |
38e296367b | 3 years ago |
![]() |
38afa57045 | 3 years ago |
![]() |
1ca41d295c | 3 years ago |
![]() |
3df86cd75a | 3 years ago |
![]() |
276984d21a | 3 years ago |
![]() |
bf055106bb | 3 years ago |
![]() |
765c997fe1 | 3 years ago |
![]() |
b5e623d841 | 3 years ago |
![]() |
1ff0723358 | 3 years ago |
![]() |
71e587a4ff | 3 years ago |
![]() |
3c8e1b2cf8 | 3 years ago |
![]() |
471a55f7ef | 3 years ago |
![]() |
c639879bd9 | 3 years ago |
![]() |
e7062da7a9 | 3 years ago |
|
b8966afb1c | 3 years ago |
|
612a5b3c41 | 3 years ago |
|
33e3de7207 | 3 years ago |
|
b870bebbc4 | 3 years ago |
|
3869121b82 | 3 years ago |
![]() |
e0f7c10126 | 3 years ago |
|
7fc95593da | 3 years ago |
|
25c7e85e9d | 3 years ago |
![]() |
748a812e01 | 3 years ago |
![]() |
a98492a2b0 | 3 years ago |
![]() |
d0e8f8f699 | 3 years ago |
|
d7b29d88ea | 3 years ago |
![]() |
b3216f0e1f | 3 years ago |
![]() |
3eef952cf6 | 3 years ago |
![]() |
7fd34380ea | 3 years ago |
![]() |
ae0ea28e86 | 3 years ago |
![]() |
a2dd36f9be | 3 years ago |
![]() |
24c633622b | 3 years ago |
![]() |
8f6b6f383c | 3 years ago |
![]() |
bbaae88fb0 | 3 years ago |
![]() |
adbd742d39 | 3 years ago |
![]() |
9db9b545a2 | 3 years ago |
|
5d5242deff | 3 years ago |
![]() |
e4f55662f5 | 3 years ago |
|
d75501a2bb | 3 years ago |
![]() |
714b43f15d | 3 years ago |
|
cc8bc5fd1f | 3 years ago |
|
5838c1b339 | 3 years ago |
|
db9b8037f9 | 3 years ago |
![]() |
2b791ec26c | 3 years ago |
|
b66ea4b429 | 3 years ago |
|
cd65ccd4aa | 3 years ago |
|
d97bb26e43 | 3 years ago |
|
74eb9e2a50 | 3 years ago |
|
483a96e0ca | 3 years ago |
|
fc754d1efa | 3 years ago |
|
6afd6c58fb | 3 years ago |
![]() |
c5a511e7f3 | 3 years ago |
![]() |
00a7fb3e54 | 3 years ago |
|
cac897916e | 3 years ago |
|
185863c7e9 | 3 years ago |
|
6f5864a562 | 3 years ago |
|
0531a22924 | 3 years ago |
|
2902aa262d | 3 years ago |
|
89ccb7db09 | 3 years ago |
|
64cec667be | 3 years ago |
|
2cad1d6270 | 3 years ago |
|
e34e4eabf1 | 3 years ago |
|
c5ebbb72eb | 3 years ago |
|
c6c5e46ebe | 3 years ago |
|
79ac85e008 | 3 years ago |
|
67cf377926 | 3 years ago |
|
7d90c569f0 | 3 years ago |
|
e174048d44 | 3 years ago |
|
e34479aecb | 3 years ago |
|
a45b81ca05 | 3 years ago |
|
6e84510f5b | 3 years ago |
|
f835db04e6 | 3 years ago |
![]() |
da0619d43c | 3 years ago |
![]() |
295538a456 | 3 years ago |
|
222a7d2aa7 | 3 years ago |
![]() |
77e5e8c1cb | 3 years ago |
![]() |
41f3163e30 | 3 years ago |
![]() |
a37c425ec8 | 3 years ago |
![]() |
6cf14178bc | 3 years ago |
![]() |
0c03e276c5 | 3 years ago |
|
7ca51ae81e | 3 years ago |
![]() |
354723290b | 3 years ago |
![]() |
b6ffeb3bb2 | 3 years ago |
|
45b88b6c75 | 3 years ago |
![]() |
69a3e4a327 | 3 years ago |
![]() |
29f5270965 | 3 years ago |
|
0baed71251 | 3 years ago |
![]() |
b7f7c96354 | 3 years ago |
![]() |
306c320354 | 3 years ago |
![]() |
2e65a64fd2 | 3 years ago |
|
85e26833ee | 3 years ago |
![]() |
ed5b4592d7 | 3 years ago |
|
55ffee4d90 | 3 years ago |
![]() |
cdf7139138 | 3 years ago |
![]() |
cc83dc4935 | 3 years ago |
![]() |
f5365e7774 | 3 years ago |
|
ee724bed64 | 3 years ago |
|
f33e43b005 | 3 years ago |
![]() |
d79424dbe4 | 3 years ago |
![]() |
cb64883ec8 | 3 years ago |
After Width: | Height: | Size: 292 KiB |
After Width: | Height: | Size: 37 KiB |
Binary file not shown.
@ -0,0 +1,18 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="6.0.10" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="6.0.10" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="6.0.10">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
</PackageReference>
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
@ -0,0 +1,14 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\BowlingEF\BowlingEF.csproj" />
|
||||
<ProjectReference Include="..\Business\Business.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
@ -1,49 +1,83 @@
|
||||
using BowlingLib.Model;
|
||||
using BowlingLib.Interface;
|
||||
using System;
|
||||
|
||||
public class StubEquipe:IDataManager<Equipe>
|
||||
{
|
||||
private List<Equipe> listEquipes = new List<Equipe>();
|
||||
public StubEquipe()
|
||||
{
|
||||
}
|
||||
|
||||
public void Add(Equipe data)
|
||||
{
|
||||
listEquipes.Add(data);
|
||||
}
|
||||
|
||||
public void Delete(Equipe data)
|
||||
{
|
||||
listEquipes.Remove(data);
|
||||
}
|
||||
|
||||
public IEnumerable<Equipe> GetAll(int n = 10, int j = 2)
|
||||
{
|
||||
for (int i = 0; i < n; i++)
|
||||
{
|
||||
this.Add(new Equipe("Equipe " + i + 1));
|
||||
|
||||
for (int k = 0; k < j; k++)
|
||||
{
|
||||
listEquipes.ElementAt(i).AjouterJoueur(new Joueur("Joueur " + i + 1 + "-" + k + 1));
|
||||
|
||||
}
|
||||
}
|
||||
return listEquipes;
|
||||
}
|
||||
|
||||
public IEnumerable<Equipe> GetAll()
|
||||
{
|
||||
return listEquipes;
|
||||
}
|
||||
|
||||
//mise à jour d'une équipe
|
||||
public void Update(Equipe data)
|
||||
{
|
||||
int index = listEquipes.FindIndex(x => x.Id == data.Id);
|
||||
listEquipes[index] = data;
|
||||
}
|
||||
|
||||
}
|
||||
using BowlingLib.Model;
|
||||
using Business;
|
||||
using System;
|
||||
|
||||
namespace BowlingStub
|
||||
{
|
||||
public class StubEquipe : IDataManager<Equipe>
|
||||
{
|
||||
private List<Equipe> listEquipes = new List<Equipe>();
|
||||
public int nbrJ = 10,nbrE = 2;
|
||||
public StubEquipe()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public async Task<bool> Add(Equipe data)
|
||||
{
|
||||
if (data != null)
|
||||
{
|
||||
listEquipes.Add(data);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public async Task<bool> Delete(Equipe data)
|
||||
{
|
||||
if (data != null)
|
||||
{
|
||||
listEquipes.Remove(data);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public void Load()
|
||||
{
|
||||
for (int i = 0; i < nbrE; i++)
|
||||
{
|
||||
this.Add(new Equipe("Equipe " + i + 1));
|
||||
|
||||
for (int k = 0; k < nbrJ; k++)
|
||||
{
|
||||
listEquipes.ElementAt(i).AjouterJoueur(new Joueur("Joueur " + i + 1 + "-" + k + 1));
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public async Task<IEnumerable<Equipe>> GetAll()
|
||||
{
|
||||
Load();
|
||||
return listEquipes;
|
||||
}
|
||||
|
||||
|
||||
//mise à jour d'une équipe
|
||||
public async Task<bool> Update(Equipe data)
|
||||
{
|
||||
if (data != null)
|
||||
{
|
||||
int index = listEquipes.FindIndex(x => x.Id == data.Id);
|
||||
listEquipes[index] = data;
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
public async Task<Equipe> GetDataWithName(string name)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public async Task<IEnumerable<Equipe>> GetAllWithDate(DateTime date)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,13 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\BowlingLib\BowlingLib.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
@ -0,0 +1,24 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
|
||||
<IsPackable>false</IsPackable>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.1.0" />
|
||||
<PackageReference Include="xunit" Version="2.4.1" />
|
||||
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.3">
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
</PackageReference>
|
||||
<PackageReference Include="coverlet.collector" Version="3.1.2">
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
</PackageReference>
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
@ -0,0 +1,11 @@
|
||||
namespace BowlingEFunitTest
|
||||
{
|
||||
public class UnitTest1
|
||||
{
|
||||
[Fact]
|
||||
public void Test1()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1 @@
|
||||
global using Xunit;
|
Loading…
Reference in new issue