test v4 sonar fix3 code bon fonctionnement pour build
continuous-integration/drone/push Build is failing Details

vSonar_test
Matheo THIERRY 2 years ago
parent 8ffb052e8e
commit 3031ec85f3

@ -21,6 +21,9 @@ namespace Biblioteque_de_Class
Mail = Umail;
Password = Upassword;
NoteList = new List<Note>();
TagList = new List<Tags>();
FavList = new List<Note>();
NoteTaged = new Dictionary<Note, List<Tags>>();
}
public string GetPseudo() { return Pseudo; }
@ -106,11 +109,9 @@ namespace Biblioteque_de_Class
/// </summary>
public void CreateNote(string nom, string LogoPath)
{
List<Note> NoteList = this.GetNoteList();
Dictionary<Note, List<Tags>> NoteTaged = this.GetNoteTaged();
foreach (Note note in NoteList)
foreach (Note eachnote in NoteList)
{
if (note.GetNom() == nom)
if (eachnote.GetNom() == nom)
{
throw new Exception("Note already exist");
}
@ -160,8 +161,7 @@ namespace Biblioteque_de_Class
/// </summary>
public void AddOneTagToNoteList(Note note, Tags tagtoadd)
{
List<Tags> ListTags = this.GetTagList();
if (ListTags.Contains(tagtoadd) == false) { throw new Exception("Tag not found"); }
if (TagList.Contains(tagtoadd) == false) { throw new Exception("Tag not found"); }
if(NoteList.Contains(note) == false) { throw new Exception("Note not found"); }
else
{
@ -174,8 +174,7 @@ namespace Biblioteque_de_Class
/// </summary>
public void SupOneTagToNoteList(Note note, Tags tagtosup)
{
List<Tags> ListTags = this.GetTagList();
if (ListTags.Contains(tagtosup) == false) { throw new Exception("Tag not found"); }
if (TagList.Contains(tagtosup) == false) { throw new Exception("Tag not found"); }
if(NoteList.Contains(note) == false) { throw new Exception("Note not found"); }
else
{

Loading…
Cancel
Save