Compare commits

..

No commits in common. 'master' and 'solution' have entirely different histories.

@ -1,43 +0,0 @@
kind: pipeline
type: docker
name: Wikipets_without_views.sln
trigger:
event:
- push
steps:
- name: build
image: mcr.microsoft.com/dotnet/sdk:7.0
commands:
- cd Sources/
- dotnet restore Wikipets_without_views.sln
- dotnet build Wikipets_without_views.sln -c Release --no-restore
depends_on: [clone]
- name: tests
image: mcr.microsoft.com/dotnet/sdk:7.0
commands:
- cd Sources/
- dotnet restore Wikipets_without_views.sln
- dotnet test Wikipets_without_views.sln --no-restore
depends_on: [build]
- name: generate-and-deploy-docs
image: hub.codefirst.iut.uca.fr/thomas.bellembois/codefirst-docdeployer
failure: ignore
volumes:
- name: docs
path: /docs
commands:
- cd Documentation/doxygen
- doxygen Doxyfile
- /entrypoint.sh
when:
branch:
- master
depends_on: [ build ]
volumes:
- name: docs
temp: {}

@ -32,7 +32,7 @@ DOXYFILE_ENCODING = UTF-8
# title of most generated pages and in a few other places.
# The default value is: My Project.
PROJECT_NAME = "Wikipet's"
PROJECT_NAME = "BACHELARD_Benjamin-BESSON_Leana"
# The PROJECT_NUMBER tag can be used to enter a project or revision number. This
# could be handy for archiving the generated documentation or if some version
@ -44,7 +44,7 @@ PROJECT_NUMBER = 1.0.0
# for a project that appears at the top of each page and should give viewer a
# quick idea about the purpose of the project. Keep the description short.
PROJECT_BRIEF = "Application for species information and keeping pets in one place"
PROJECT_BRIEF = ""
# With the PROJECT_LOGO tag one can specify a logo or an icon that is included
# in the documentation. The maximum height of the logo should not exceed 55

@ -35,7 +35,7 @@ namespace Model
public string TailleMoyenne { get; set; }
[DataMember(Name = "races")]
public List<Race> ListeRaces { get; set; } = new List<Race>();
public List<Race>? ListeRaces { get; set; } = new List<Race>();
[DataMember(Name = "comportement")]
public string Comportement { get; set; }
@ -59,7 +59,7 @@ namespace Model
* \fn Espece(string nom = "", string nomScientifique = "", string image = "", string esperanceVie = "", string poidsMoyen = "", string tailleMoyenne = "", List<Race>? races = null, string comportement = "", string sante = "", string education = "", string entretien = "", string cout = "", string conseil = "")
* \brief Espece class constructor
*/
public Espece(List<Race> races, string nom = "", string nomScientifique = "", string image = "", string esperanceVie = "", string poidsMoyen = "", string tailleMoyenne = "", string comportement = "", string sante = "", string education = "", string entretien = "", string cout = "", string conseil = "")
public Espece(string nom = "", string nomScientifique = "", string image = "", string esperanceVie = "", string poidsMoyen = "", string tailleMoyenne = "", List<Race>? races = null, string comportement = "", string sante = "", string education = "", string entretien = "", string cout = "", string conseil = "")
{
Nom = nom;
NomScientifique = nomScientifique;

@ -53,10 +53,10 @@ namespace Model
public string? Image { get; set; }
/*!
* \fn Race(string nom, string nomScientifique, string esperanceVie, string poidsMoyen, string tailleMoyenne, string comportement, string sante, string education, string entretien, string cout, string conseil, string? image = null)
* \fn Race(string nom = "Inconnu", string nomScientifique = "Inconnu", string esperanceVie = "Inconnue", string poidsMoyen = "Inconnu", string tailleMoyenne = "Inconnu", string comportement = "Auncune information", string sante = "Aucune information", string education = "Auncune information", string entretien = "Aucune information", string cout = "Auncune information", string conseil = "Aucun conseil")
* \brief Race class constructor
*/
public Race(string nom, string nomScientifique= "Inconnu", string esperanceVie = "Inconnue", string poidsMoyen = "Inconnu", string tailleMoyenne = "Inconnue", string comportement = "Inconnu", string sante = "Inconnue", string education = "Inconnue", string entretien = "Inconnu", string cout = "Inconnu", string conseil = "Inconnu", string? image = null)
public Race(string nom = "Inconnu", string nomScientifique = "Inconnu", string esperanceVie = "Inconnue", string poidsMoyen = "Inconnu", string tailleMoyenne = "Inconnu", string comportement = "Auncune information", string sante = "Aucune information", string education = "Auncune information", string entretien = "Aucune information", string cout = "Auncune information", string conseil = "Aucun conseil")
{
Nom = nom;
NomScientifique = nomScientifique;
@ -69,7 +69,6 @@ namespace Model
Entretien = entretien;
Cout = cout;
Conseil = conseil;
Image = image;
}
/*!

@ -23,10 +23,10 @@ namespace Model
Races.Add(new("Abyssin", "", "", "", "", "", "", "", "", "", "Conseil Abyssin"));
Races.Add(new("American curl"));
ListeEspeces.Add(new(new List<Race>(), "Chien", "Canis lupus familiaris", "chien.jpg"));
ListeEspeces.Add(new(Races, "Chat", "Felis catus", "chat.jpg", "15 à 20 ans", "15 à 20 kg", "10 à 15 cm", "Les chats ont un comportement très solitaire", "Les chats ont une bonne santé", "Les chats s'éduque assez facilement", "Il faut changé leur caisse mais il se nettoie seul, sauf les chatons", "Vétérinaire, alimentation adapté, jouet", "Un conseil pour un chat"));
ListeEspeces.Add(new(new List<Race>(), "Hamster", "Cricetinae"));
ListeEspeces.Add(new(new List<Race>(), "Lapin", "Oryctolagus cuniculus"));
ListeEspeces.Add(new("Chien", "Canis lupus familiaris", "chien.jpg"));
ListeEspeces.Add(new("Chat", "Felis catus", "chat.jpg", "15 à 20 ans", "15 à 20 kg", "10 à 15 cm", Races, "Les chats ont un comportement très solitaire", "Les chats ont une bonne santé", "Les chats s'éduque assez facilement", "Il faut changé leur caisse mais il se nettoie seul, sauf les chatons", "Vétérinaire, alimentation adapté, jouet", "Un conseil pour un chat"));
ListeEspeces.Add(new("Hamster", "Cricetinae"));
ListeEspeces.Add(new("Lapin", "Oryctolagus cuniculus"));
return ListeEspeces;
}

@ -1,27 +0,0 @@
using Model;
namespace Tests
{
public class Test_espece
{
[Theory]
public void TestConstructor(string nom, string expectedNom, string nomScientifique, string exceptedNomScientifique, string esperanceVie, string exceptedEsperanceVie, string poidsMoyen, string exceptedPoidsMoyen, string tailleMoyenne, string exceptedTailleMoyenne, string comportement, string exceptedComportement, string sante, string exceptedSante, string education, string exceptedEducation, string entretien, string exceptedEntretien, string cout, string exceptedCout, string conseil, string exceptedConseil, string? image, string? exceptedImage, List<Race> listeRace, List<Race> exceptedListeRace)
{
Espece e = new Espece(listeRace, nom, nomScientifique, image, esperanceVie, poidsMoyen, tailleMoyenne, comportement, sante, education, entretien, cout, conseil);
Assert.Equal(expectedNom, e.Nom);
Assert.Equal(exceptedNomScientifique, e.NomScientifique);
Assert.Equal(exceptedEsperanceVie, e.EsperanceVie);
Assert.Equal(exceptedPoidsMoyen, e.PoidsMoyen);
Assert.Equal(exceptedTailleMoyenne, e.TailleMoyenne);
Assert.Equal(exceptedComportement, e.Comportement);
Assert.Equal(exceptedSante, e.Sante);
Assert.Equal(exceptedEducation, e.Education);
Assert.Equal(exceptedEntretien, e.Entretien);
Assert.Equal(exceptedCout, e.Cout);
Assert.Equal(exceptedConseil, e.Conseil);
Assert.Equal(exceptedImage, e.Image);
Assert.Equal(exceptedListeRace.Count, e.ListeRaces.Count());
Assert.All(exceptedListeRace, r => e.ListeRaces.Contains(r));
}
}
}

@ -1,29 +0,0 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<IsPackable>false</IsPackable>
<IsTestProject>true</IsTestProject>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.5.0" />
<PackageReference Include="xunit" Version="2.4.2" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.5">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="coverlet.collector" Version="3.2.0">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Model\Model.csproj" />
</ItemGroup>
</Project>

@ -1,30 +0,0 @@
using System.Runtime.CompilerServices;
using Model;
using NuGet.Frameworks;
namespace Tests
{
public class Tests_race
{
[Theory]
[InlineData("", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", null, null)]
[InlineData("American curl", "American curl", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "Un petit conseil", "Un petit conseil", null, null)]
[InlineData("Abyssin", "Abyssin", "Felis catus", "Felis catus", "15 à 20 ans", "15 à 20 ans", "2.7 à 5.5 kg", "2.7 à 5.5 kg", "30 à 45 cm", "30 à 45 cm", "Son comportement", "Son comportement", "Sa santé", "Sa santé", "Son éducation", "Son éducation", "Son entretien", "Son entretien", "Son cout", "Son cout", "Un petit conseil", "Un petit conseil", "abyssin.png", "abyssin.png")]
public void TestConstructor(string nom, string expectedNom, string nomScientifique, string exceptedNomScientifique, string esperanceVie, string exceptedEsperanceVie, string poidsMoyen, string exceptedPoidsMoyen, string tailleMoyenne, string exceptedTailleMoyenne, string comportement, string exceptedComportement, string sante, string exceptedSante, string education, string exceptedEducation, string entretien, string exceptedEntretien, string cout, string exceptedCout, string conseil, string exceptedConseil, string? image, string? exceptedImage)
{
Race r = new Race(nom, nomScientifique, esperanceVie, poidsMoyen, tailleMoyenne, comportement, sante, education, entretien, cout, conseil, image);
Assert.Equal(expectedNom, r.Nom);
Assert.Equal(exceptedNomScientifique, r.NomScientifique);
Assert.Equal(exceptedEsperanceVie, r.EsperanceVie);
Assert.Equal(exceptedPoidsMoyen, r.PoidsMoyen);
Assert.Equal(exceptedTailleMoyenne, r.TailleMoyenne);
Assert.Equal(exceptedComportement, r.Comportement);
Assert.Equal(exceptedSante, r.Sante);
Assert.Equal(exceptedEducation, r.Education);
Assert.Equal(exceptedEntretien, r.Entretien);
Assert.Equal(exceptedCout, r.Cout);
Assert.Equal(exceptedConseil, r.Conseil);
Assert.Equal(exceptedImage, r.Image);
}
}
}

@ -1 +0,0 @@
global using Xunit;

@ -12,9 +12,7 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Views", "Views\Views.csproj
{83309215-075B-406F-A72E-45E40AD47E43} = {83309215-075B-406F-A72E-45E40AD47E43}
EndProjectSection
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Persistance", "Persistance\Persistance.csproj", "{E056C06A-C2FF-40FE-A8B2-CE581F415BB6}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tests", "Tests\Tests.csproj", "{4BFD8DFB-D72D-406E-8E66-F23099FD974F}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Persistance", "Persistance\Persistance.csproj", "{E056C06A-C2FF-40FE-A8B2-CE581F415BB6}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
@ -120,26 +118,6 @@ Global
{E056C06A-C2FF-40FE-A8B2-CE581F415BB6}.Release|x64.Build.0 = Release|Any CPU
{E056C06A-C2FF-40FE-A8B2-CE581F415BB6}.Release|x86.ActiveCfg = Release|Any CPU
{E056C06A-C2FF-40FE-A8B2-CE581F415BB6}.Release|x86.Build.0 = Release|Any CPU
{4BFD8DFB-D72D-406E-8E66-F23099FD974F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{4BFD8DFB-D72D-406E-8E66-F23099FD974F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{4BFD8DFB-D72D-406E-8E66-F23099FD974F}.Debug|ARM.ActiveCfg = Debug|Any CPU
{4BFD8DFB-D72D-406E-8E66-F23099FD974F}.Debug|ARM.Build.0 = Debug|Any CPU
{4BFD8DFB-D72D-406E-8E66-F23099FD974F}.Debug|ARM64.ActiveCfg = Debug|Any CPU
{4BFD8DFB-D72D-406E-8E66-F23099FD974F}.Debug|ARM64.Build.0 = Debug|Any CPU
{4BFD8DFB-D72D-406E-8E66-F23099FD974F}.Debug|x64.ActiveCfg = Debug|Any CPU
{4BFD8DFB-D72D-406E-8E66-F23099FD974F}.Debug|x64.Build.0 = Debug|Any CPU
{4BFD8DFB-D72D-406E-8E66-F23099FD974F}.Debug|x86.ActiveCfg = Debug|Any CPU
{4BFD8DFB-D72D-406E-8E66-F23099FD974F}.Debug|x86.Build.0 = Debug|Any CPU
{4BFD8DFB-D72D-406E-8E66-F23099FD974F}.Release|Any CPU.ActiveCfg = Release|Any CPU
{4BFD8DFB-D72D-406E-8E66-F23099FD974F}.Release|Any CPU.Build.0 = Release|Any CPU
{4BFD8DFB-D72D-406E-8E66-F23099FD974F}.Release|ARM.ActiveCfg = Release|Any CPU
{4BFD8DFB-D72D-406E-8E66-F23099FD974F}.Release|ARM.Build.0 = Release|Any CPU
{4BFD8DFB-D72D-406E-8E66-F23099FD974F}.Release|ARM64.ActiveCfg = Release|Any CPU
{4BFD8DFB-D72D-406E-8E66-F23099FD974F}.Release|ARM64.Build.0 = Release|Any CPU
{4BFD8DFB-D72D-406E-8E66-F23099FD974F}.Release|x64.ActiveCfg = Release|Any CPU
{4BFD8DFB-D72D-406E-8E66-F23099FD974F}.Release|x64.Build.0 = Release|Any CPU
{4BFD8DFB-D72D-406E-8E66-F23099FD974F}.Release|x86.ActiveCfg = Release|Any CPU
{4BFD8DFB-D72D-406E-8E66-F23099FD974F}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE

@ -1,31 +1,31 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.5.33424.131
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Console", "Console\Console.csproj", "{66D1B4E7-A14F-4DCE-89D1-31CC53E5F3B9}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Model", "Model\Model.csproj", "{83309215-075B-406F-A72E-45E40AD47E43}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{66D1B4E7-A14F-4DCE-89D1-31CC53E5F3B9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{66D1B4E7-A14F-4DCE-89D1-31CC53E5F3B9}.Debug|Any CPU.Build.0 = Debug|Any CPU
{66D1B4E7-A14F-4DCE-89D1-31CC53E5F3B9}.Release|Any CPU.ActiveCfg = Release|Any CPU
{66D1B4E7-A14F-4DCE-89D1-31CC53E5F3B9}.Release|Any CPU.Build.0 = Release|Any CPU
{83309215-075B-406F-A72E-45E40AD47E43}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{83309215-075B-406F-A72E-45E40AD47E43}.Debug|Any CPU.Build.0 = Debug|Any CPU
{83309215-075B-406F-A72E-45E40AD47E43}.Release|Any CPU.ActiveCfg = Release|Any CPU
{83309215-075B-406F-A72E-45E40AD47E43}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {B8A5349C-3C89-45FC-94B1-9702CDFE90DF}
EndGlobalSection
EndGlobal

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.5.33424.131
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Console", "Console\Console.csproj", "{66D1B4E7-A14F-4DCE-89D1-31CC53E5F3B9}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Model", "Model\Model.csproj", "{83309215-075B-406F-A72E-45E40AD47E43}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{66D1B4E7-A14F-4DCE-89D1-31CC53E5F3B9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{66D1B4E7-A14F-4DCE-89D1-31CC53E5F3B9}.Debug|Any CPU.Build.0 = Debug|Any CPU
{66D1B4E7-A14F-4DCE-89D1-31CC53E5F3B9}.Release|Any CPU.ActiveCfg = Release|Any CPU
{66D1B4E7-A14F-4DCE-89D1-31CC53E5F3B9}.Release|Any CPU.Build.0 = Release|Any CPU
{83309215-075B-406F-A72E-45E40AD47E43}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{83309215-075B-406F-A72E-45E40AD47E43}.Debug|Any CPU.Build.0 = Debug|Any CPU
{83309215-075B-406F-A72E-45E40AD47E43}.Release|Any CPU.ActiveCfg = Release|Any CPU
{83309215-075B-406F-A72E-45E40AD47E43}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {B8A5349C-3C89-45FC-94B1-9702CDFE90DF}
EndGlobalSection
EndGlobal
Loading…
Cancel
Save