merge xaml branch into master

pull/69/head
Antoine PEREDERII 2 years ago
commit b714623acd

@ -5,7 +5,7 @@ name: CI
trigger:
branch:
- master
- C#/model
- ci/*
event:
- push
@ -41,8 +41,8 @@ steps:
- dotnet sonarscanner begin /k:"Banquale" /d:sonar.host.url=$${PLUGIN_SONAR_HOST} /d:sonar.login=$${PLUGIN_SONAR_TOKEN}
- dotnet build Banquale.sln -c Release --no-restore
- dotnet test Banquale.sln --logger trx --no-restore /p:CollectCoverage=true /p:CoverletOutputFormat=cobertura --collect "XPlat Code Coverage"
# - reportgenerator -reports:"**/coverage.cobertura.xml" -reporttypes:SonarQube -targetdir:"coveragereport"
# - dotnet publish Banquale/Banquale.csproj -c Release --no-restore -o $CI_PROJECT_DIR/build/release -f:net7.0-android /p:AndroidSdkDirectory=/usr/lib/android-sdk
- reportgenerator -reports:"**/coverage.cobertura.xml" -reporttypes:SonarQube -targetdir:"coveragereport"
- dotnet publish Banquale/Banquale.csproj -c Release --no-restore -o $CI_PROJECT_DIR/build/release -f:net7.0-android /p:AndroidSdkDirectory=/usr/lib/android-sdk
- dotnet sonarscanner end /d:sonar.login=$${PLUGIN_SONAR_TOKEN}
depends_on: [tests]

@ -78,4 +78,4 @@ The application is functional but the color is not good and the design is not fi
This project is licensed under the MIT License - see the [LICENSE.md](LICENSE.md) file for details.
## Acknowledgments
This project was inspired by our mobile bank app, the need for a modern and user-friendly mobile banking application. Special thanks to the .NET MAUI community for their contributions and support.
This project was inspired by our mobile bank app, the need for a modern and user-friendly mobile banking application. Special thanks to the .NET MAUI community for their contributions and support and Clement Freville for his support.

@ -23,7 +23,7 @@ public partial class TransferPage : ContentPage
{
await DisplayAlert("Erreur", "L'IBAN doit contenir exactement 25 chiffres.", "OK");
}
if (Name.Text == Mgr.SelectedAccount.Name && IBAN.Text == Mgr.SelectedAccount.IBAN)
if(Name.Text == Mgr.SelectedAccount.Name && IBAN.Text == Mgr.SelectedAccount.IBAN)
{
await DisplayAlert("Erreur", "Vous ne pouvez vous faire de virement à vous même", "OK");
return;

@ -1,78 +1,78 @@
using System;
using Model;
//using System;
//using Model;
namespace UnitTest
{
/// \file
/// \brief Fichier de tests pour la classe Customer.
/// \author Votre nom
//namespace UnitTest
//{
// /// \file
// /// \brief Fichier de tests pour la classe Customer.
// /// \author Votre nom
/// <summary>
/// Classe de tests pour la classe Customer.
/// </summary>
public class CustomerTests
{
/// <summary>
/// Teste si la liste des comptes du client est initialisée correctement.
/// </summary>
[Fact]
public void Constructor_AccountsListInitialized()
{
// Arrange
string name = "Doe";
string firstName = "John";
string password = "123456";
// /// <summary>
// /// Classe de tests pour la classe Customer.
// /// </summary>
// public class CustomerTests
// {
// /// <summary>
// /// Teste si la liste des comptes du client est initialisée correctement.
// /// </summary>
// [Fact]
// public void Constructor_AccountsListInitialized()
// {
// // Arrange
// string name = "Doe";
// string firstName = "John";
// string password = "123456";
// Act
Customer customer = new Customer(name, firstName, password);
// // Act
// Customer customer = new Customer(name, firstName, password);
// Assert
Assert.NotNull(customer.AccountsList);
Assert.Empty(customer.AccountsList);
}
// // Assert
// Assert.NotNull(customer.AccountsList);
// Assert.Empty(customer.AccountsList);
// }
/// <summary>
/// Teste l'égalité entre deux clients.
/// </summary>
[Fact]
public void Equals_TwoEqualCustomers_ReturnsTrue()
{
// Arrange
string name1 = "Doe";
string firstName1 = "John";
string password1 = "123456";
string name2 = "Doe";
string firstName2 = "John";
string password2 = "123456";
// /// <summary>
// /// Teste l'égalité entre deux clients.
// /// </summary>
// [Fact]
// public void Equals_TwoEqualCustomers_ReturnsTrue()
// {
// // Arrange
// string name1 = "Doe";
// string firstName1 = "John";
// string password1 = "123456";
// string name2 = "Doe";
// string firstName2 = "John";
// string password2 = "123456";
// Act
Customer customer1 = new Customer(name1, firstName1, password1);
Customer customer2 = new Customer(name2, firstName2, password2);
// // Act
// Customer customer1 = new Customer(name1, firstName1, password1);
// Customer customer2 = new Customer(name2, firstName2, password2);
// Assert
Assert.True(customer1.Equals(customer2));
}
// // Assert
// Assert.True(customer1.Equals(customer2));
// }
/// <summary>
/// Teste l'égalité entre deux clients avec des identifiants différents.
/// </summary>
[Fact]
public void Equals_TwoDifferentCustomers_ReturnsFalse()
{
// Arrange
string name1 = "Doe";
string firstName1 = "John";
string password1 = "123456";
string name2 = "Smith";
string firstName2 = "Jane";
string password2 = "abcdef";
// /// <summary>
// /// Teste l'égalité entre deux clients avec des identifiants différents.
// /// </summary>
// [Fact]
// public void Equals_TwoDifferentCustomers_ReturnsFalse()
// {
// // Arrange
// string name1 = "Doe";
// string firstName1 = "John";
// string password1 = "123456";
// string name2 = "Smith";
// string firstName2 = "Jane";
// string password2 = "abcdef";
// Act
Customer customer1 = new Customer(name1, firstName1, password1);
Customer customer2 = new Customer(name2, firstName2, password2);
// // Act
// Customer customer1 = new Customer(name1, firstName1, password1);
// Customer customer2 = new Customer(name2, firstName2, password2);
// Assert
Assert.False(customer1.Equals(customer2));
}
}
}
// // Assert
// Assert.False(customer1.Equals(customer2));
// }
// }
//}

@ -1,62 +1,62 @@
/// \file
/// \brief Définition de la classe Person.
/// \author Votre nom
using System;
using Model;
namespace UnitTest
{
/// \file
/// \brief Fichier de tests pour la classe Person.
/// \author Votre nom
/// <summary>
/// Classe de tests pour la classe Person.
/// </summary>
public class PersonTest
{
/// <summary>
/// Teste si les propriétés de l'objet Person sont correctement définies lorsque les arguments du constructeur sont valides.
/// </summary>
[Fact]
public void Constructor_ValidArguments_PropertiesSet()
{
// Arrange
string name = "Doe";
string firstName = "John";
string password = "123456";
// Act
Person person = new Person(name, firstName, password);
// Assert
Assert.Equal(name, person.Name);
Assert.Equal(firstName, person.FirstName);
Assert.Equal(password, person.Password);
}
/// <summary>
/// Teste si l'identifiant de chaque instance de Person est correctement incrémenté.
/// </summary>
[Fact]
public void Constructor_IncrementId()
{
// Arrange
string name1 = "Doe";
string firstName1 = "John";
string password1 = "123456";
string name2 = "Smith";
string firstName2 = "Jane";
string password2 = "abcdef";
// Act
Person person1 = new Person(name1, firstName1, password1);
Person person2 = new Person(name2, firstName2, password2);
// Assert
Assert.Equal(Convert.ToUInt32(0), person1.Id);
Assert.Equal(Convert.ToUInt32(1), person2.Id);
}
}
}
///// \file
///// \brief Définition de la classe Person.
///// \author Votre nom
//using System;
//using Model;
//namespace UnitTest
//{
// /// \file
// /// \brief Fichier de tests pour la classe Person.
// /// \author Votre nom
// /// <summary>
// /// Classe de tests pour la classe Person.
// /// </summary>
// public class PersonTest
// {
// /// <summary>
// /// Teste si les propriétés de l'objet Person sont correctement définies lorsque les arguments du constructeur sont valides.
// /// </summary>
// [Fact]
// public void Constructor_ValidArguments_PropertiesSet()
// {
// // Arrange
// string name = "Doe";
// string firstName = "John";
// string password = "123456";
// // Act
// Person person = new Person(name, firstName, password);
// // Assert
// Assert.Equal(name, person.Name);
// Assert.Equal(firstName, person.FirstName);
// Assert.Equal(password, person.Password);
// }
// /// <summary>
// /// Teste si l'identifiant de chaque instance de Person est correctement incrémenté.
// /// </summary>
// [Fact]
// public void Constructor_IncrementId()
// {
// // Arrange
// string name1 = "Doe";
// string firstName1 = "John";
// string password1 = "123456";
// string name2 = "Smith";
// string firstName2 = "Jane";
// string password2 = "abcdef";
// // Act
// Person person1 = new Person(name1, firstName1, password1);
// Person person2 = new Person(name2, firstName2, password2);
// // Assert
// Assert.Equal(Convert.ToUInt32(0), person1.Id);
// Assert.Equal(Convert.ToUInt32(1), person2.Id);
// }
// }
//}

@ -16,6 +16,10 @@
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="coverlet.collector" Version="6.0.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
</ItemGroup>
<ItemGroup>

Loading…
Cancel
Save