Compare commits
25 Commits
b113d34ecc
...
365742508e
Author | SHA1 | Date |
---|---|---|
|
365742508e | 2 years ago |
|
9b2afcc6b2 | 2 years ago |
![]() |
13f9923f6c | 2 years ago |
![]() |
c60fc07efc | 2 years ago |
![]() |
9d40742045 | 2 years ago |
|
3ec2199411 | 2 years ago |
|
d1875e97eb | 2 years ago |
|
b6fc6871ab | 2 years ago |
|
1f568ba29f | 2 years ago |
|
975b5fbde7 | 2 years ago |
|
2eb4330263 | 2 years ago |
![]() |
091b016244 | 2 years ago |
![]() |
46d86bc107 | 2 years ago |
![]() |
76eece9089 | 2 years ago |
![]() |
1478707057 | 2 years ago |
![]() |
d2688b2d92 | 2 years ago |
|
b1d05eabfe | 2 years ago |
|
2d177dc028 | 2 years ago |
|
2071f8ba32 | 2 years ago |
|
9bbd0f3e4f | 2 years ago |
![]() |
1b4352e22b | 2 years ago |
![]() |
6ce50be142 | 2 years ago |
|
6005c16a35 | 2 years ago |
|
72aa47ee35 | 2 years ago |
![]() |
67245868b2 | 2 years ago |
@ -0,0 +1,496 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Database xmlns:i="http://www.w3.org/2001/XMLSchema-instance" i:type="ArrayOfUser" xmlns="http://schemas.datacontract.org/2004/07/Biblioteque_de_Class">
|
||||||
|
<User>
|
||||||
|
<Email>leHeros@gmail.com</Email>
|
||||||
|
<FavList />
|
||||||
|
<NoteList>
|
||||||
|
<Note z:Id="i1" xmlns:z="http://schemas.microsoft.com/2003/10/Serialization/">
|
||||||
|
<Collaborators>
|
||||||
|
<User>
|
||||||
|
<Email>labsent@gmail.com</Email>
|
||||||
|
<FavList />
|
||||||
|
<NoteList>
|
||||||
|
<Note z:Id="i2">
|
||||||
|
<Collaborators />
|
||||||
|
<CreationDate xmlns:d9p1="http://schemas.datacontract.org/2004/07/System" />
|
||||||
|
<Editors>
|
||||||
|
<User>
|
||||||
|
<Email>labsent@gmail.com</Email>
|
||||||
|
<FavList />
|
||||||
|
<NoteList>
|
||||||
|
<Note z:Ref="i2" />
|
||||||
|
<Note z:Ref="i1" />
|
||||||
|
</NoteList>
|
||||||
|
<NoteTagged xmlns:d11p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
|
||||||
|
<d11p1:KeyValueOfNoteArrayOfTagsw0Ob5Kw8>
|
||||||
|
<d11p1:Key z:Ref="i2" />
|
||||||
|
<d11p1:Value />
|
||||||
|
</d11p1:KeyValueOfNoteArrayOfTagsw0Ob5Kw8>
|
||||||
|
</NoteTagged>
|
||||||
|
<Password>fa7d77716ab4b614012aef71d589ef1bd018e1e25438c8546d1a2ce83b52c5c4</Password>
|
||||||
|
<Picture>defaultpicture.png</Picture>
|
||||||
|
<TagList>
|
||||||
|
<Tags>
|
||||||
|
<Color>#5555FF</Color>
|
||||||
|
<Name>Tag 1</Name>
|
||||||
|
</Tags>
|
||||||
|
</TagList>
|
||||||
|
<UseTheme>
|
||||||
|
<ColorList xmlns:d12p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
|
||||||
|
<d12p1:string>,,</d12p1:string>
|
||||||
|
</ColorList>
|
||||||
|
<Name></Name>
|
||||||
|
</UseTheme>
|
||||||
|
<Username>Benjamin</Username>
|
||||||
|
</User>
|
||||||
|
</Editors>
|
||||||
|
<ImageList />
|
||||||
|
<LogoPath>DefaultLogo.png</LogoPath>
|
||||||
|
<ModificationDate xmlns:d9p1="http://schemas.datacontract.org/2004/07/System" />
|
||||||
|
<Name>Note 1</Name>
|
||||||
|
<Owner>
|
||||||
|
<Email>labsent@gmail.com</Email>
|
||||||
|
<FavList />
|
||||||
|
<NoteList>
|
||||||
|
<Note z:Ref="i2" />
|
||||||
|
<Note z:Ref="i1" />
|
||||||
|
</NoteList>
|
||||||
|
<NoteTagged xmlns:d10p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
|
||||||
|
<d10p1:KeyValueOfNoteArrayOfTagsw0Ob5Kw8>
|
||||||
|
<d10p1:Key z:Ref="i2" />
|
||||||
|
<d10p1:Value />
|
||||||
|
</d10p1:KeyValueOfNoteArrayOfTagsw0Ob5Kw8>
|
||||||
|
</NoteTagged>
|
||||||
|
<Password>fa7d77716ab4b614012aef71d589ef1bd018e1e25438c8546d1a2ce83b52c5c4</Password>
|
||||||
|
<Picture>defaultpicture.png</Picture>
|
||||||
|
<TagList>
|
||||||
|
<Tags>
|
||||||
|
<Color>#5555FF</Color>
|
||||||
|
<Name>Tag 1</Name>
|
||||||
|
</Tags>
|
||||||
|
</TagList>
|
||||||
|
<UseTheme>
|
||||||
|
<ColorList xmlns:d11p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
|
||||||
|
<d11p1:string>,,</d11p1:string>
|
||||||
|
</ColorList>
|
||||||
|
<Name></Name>
|
||||||
|
</UseTheme>
|
||||||
|
<Username>Benjamin</Username>
|
||||||
|
</Owner>
|
||||||
|
<Text></Text>
|
||||||
|
<logoPath>DefaultLogo.png</logoPath>
|
||||||
|
<name>Note 1</name>
|
||||||
|
</Note>
|
||||||
|
<Note z:Ref="i1" />
|
||||||
|
</NoteList>
|
||||||
|
<NoteTagged xmlns:d7p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
|
||||||
|
<d7p1:KeyValueOfNoteArrayOfTagsw0Ob5Kw8>
|
||||||
|
<d7p1:Key z:Ref="i2" />
|
||||||
|
<d7p1:Value />
|
||||||
|
</d7p1:KeyValueOfNoteArrayOfTagsw0Ob5Kw8>
|
||||||
|
</NoteTagged>
|
||||||
|
<Password>fa7d77716ab4b614012aef71d589ef1bd018e1e25438c8546d1a2ce83b52c5c4</Password>
|
||||||
|
<Picture>defaultpicture.png</Picture>
|
||||||
|
<TagList>
|
||||||
|
<Tags>
|
||||||
|
<Color>#5555FF</Color>
|
||||||
|
<Name>Tag 1</Name>
|
||||||
|
</Tags>
|
||||||
|
</TagList>
|
||||||
|
<UseTheme>
|
||||||
|
<ColorList xmlns:d8p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
|
||||||
|
<d8p1:string>,,</d8p1:string>
|
||||||
|
</ColorList>
|
||||||
|
<Name></Name>
|
||||||
|
</UseTheme>
|
||||||
|
<Username>Benjamin</Username>
|
||||||
|
</User>
|
||||||
|
<User>
|
||||||
|
<Email>liammonchanin@gmail.com</Email>
|
||||||
|
<FavList />
|
||||||
|
<NoteList>
|
||||||
|
<Note z:Id="i3">
|
||||||
|
<Collaborators />
|
||||||
|
<CreationDate xmlns:d9p1="http://schemas.datacontract.org/2004/07/System" />
|
||||||
|
<Editors>
|
||||||
|
<User>
|
||||||
|
<Email>liammonchanin@gmail.com</Email>
|
||||||
|
<FavList />
|
||||||
|
<NoteList>
|
||||||
|
<Note z:Ref="i3" />
|
||||||
|
<Note z:Ref="i1" />
|
||||||
|
</NoteList>
|
||||||
|
<NoteTagged xmlns:d11p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
|
||||||
|
<d11p1:KeyValueOfNoteArrayOfTagsw0Ob5Kw8>
|
||||||
|
<d11p1:Key z:Ref="i3" />
|
||||||
|
<d11p1:Value />
|
||||||
|
</d11p1:KeyValueOfNoteArrayOfTagsw0Ob5Kw8>
|
||||||
|
</NoteTagged>
|
||||||
|
<Password>dd13d2e59703e108138db99aadebdc3e308e175d5649061baf2764ab6c039a9b</Password>
|
||||||
|
<Picture>defaultpicture.png</Picture>
|
||||||
|
<TagList>
|
||||||
|
<Tags>
|
||||||
|
<Color>#5555FF</Color>
|
||||||
|
<Name>Tag 2</Name>
|
||||||
|
</Tags>
|
||||||
|
</TagList>
|
||||||
|
<UseTheme>
|
||||||
|
<ColorList xmlns:d12p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
|
||||||
|
<d12p1:string>,,</d12p1:string>
|
||||||
|
</ColorList>
|
||||||
|
<Name></Name>
|
||||||
|
</UseTheme>
|
||||||
|
<Username>Liam</Username>
|
||||||
|
</User>
|
||||||
|
</Editors>
|
||||||
|
<ImageList />
|
||||||
|
<LogoPath>DefaultLogo.png</LogoPath>
|
||||||
|
<ModificationDate xmlns:d9p1="http://schemas.datacontract.org/2004/07/System" />
|
||||||
|
<Name>Note 2</Name>
|
||||||
|
<Owner>
|
||||||
|
<Email>liammonchanin@gmail.com</Email>
|
||||||
|
<FavList />
|
||||||
|
<NoteList>
|
||||||
|
<Note z:Ref="i3" />
|
||||||
|
<Note z:Ref="i1" />
|
||||||
|
</NoteList>
|
||||||
|
<NoteTagged xmlns:d10p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
|
||||||
|
<d10p1:KeyValueOfNoteArrayOfTagsw0Ob5Kw8>
|
||||||
|
<d10p1:Key z:Ref="i3" />
|
||||||
|
<d10p1:Value />
|
||||||
|
</d10p1:KeyValueOfNoteArrayOfTagsw0Ob5Kw8>
|
||||||
|
</NoteTagged>
|
||||||
|
<Password>dd13d2e59703e108138db99aadebdc3e308e175d5649061baf2764ab6c039a9b</Password>
|
||||||
|
<Picture>defaultpicture.png</Picture>
|
||||||
|
<TagList>
|
||||||
|
<Tags>
|
||||||
|
<Color>#5555FF</Color>
|
||||||
|
<Name>Tag 2</Name>
|
||||||
|
</Tags>
|
||||||
|
</TagList>
|
||||||
|
<UseTheme>
|
||||||
|
<ColorList xmlns:d11p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
|
||||||
|
<d11p1:string>,,</d11p1:string>
|
||||||
|
</ColorList>
|
||||||
|
<Name></Name>
|
||||||
|
</UseTheme>
|
||||||
|
<Username>Liam</Username>
|
||||||
|
</Owner>
|
||||||
|
<Text></Text>
|
||||||
|
<logoPath>DefaultLogo.png</logoPath>
|
||||||
|
<name>Note 2</name>
|
||||||
|
</Note>
|
||||||
|
<Note z:Ref="i1" />
|
||||||
|
</NoteList>
|
||||||
|
<NoteTagged xmlns:d7p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
|
||||||
|
<d7p1:KeyValueOfNoteArrayOfTagsw0Ob5Kw8>
|
||||||
|
<d7p1:Key z:Ref="i3" />
|
||||||
|
<d7p1:Value />
|
||||||
|
</d7p1:KeyValueOfNoteArrayOfTagsw0Ob5Kw8>
|
||||||
|
</NoteTagged>
|
||||||
|
<Password>dd13d2e59703e108138db99aadebdc3e308e175d5649061baf2764ab6c039a9b</Password>
|
||||||
|
<Picture>defaultpicture.png</Picture>
|
||||||
|
<TagList>
|
||||||
|
<Tags>
|
||||||
|
<Color>#5555FF</Color>
|
||||||
|
<Name>Tag 2</Name>
|
||||||
|
</Tags>
|
||||||
|
</TagList>
|
||||||
|
<UseTheme>
|
||||||
|
<ColorList xmlns:d8p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
|
||||||
|
<d8p1:string>,,</d8p1:string>
|
||||||
|
</ColorList>
|
||||||
|
<Name></Name>
|
||||||
|
</UseTheme>
|
||||||
|
<Username>Liam</Username>
|
||||||
|
</User>
|
||||||
|
</Collaborators>
|
||||||
|
<CreationDate xmlns:d5p1="http://schemas.datacontract.org/2004/07/System" />
|
||||||
|
<Editors>
|
||||||
|
<User>
|
||||||
|
<Email>leHeros@gmail.com</Email>
|
||||||
|
<FavList />
|
||||||
|
<NoteList>
|
||||||
|
<Note z:Ref="i1" />
|
||||||
|
</NoteList>
|
||||||
|
<NoteTagged xmlns:d7p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
|
||||||
|
<d7p1:KeyValueOfNoteArrayOfTagsw0Ob5Kw8>
|
||||||
|
<d7p1:Key z:Ref="i1" />
|
||||||
|
<d7p1:Value>
|
||||||
|
<Tags>
|
||||||
|
<Color>#5555FF</Color>
|
||||||
|
<Name>Tag 0</Name>
|
||||||
|
</Tags>
|
||||||
|
</d7p1:Value>
|
||||||
|
</d7p1:KeyValueOfNoteArrayOfTagsw0Ob5Kw8>
|
||||||
|
</NoteTagged>
|
||||||
|
<Password>2cbb89e6f9b003468ecfc7957b6c2a2da22c8e2f600cb115323800dc0da20467</Password>
|
||||||
|
<Picture>defaultpicture.png</Picture>
|
||||||
|
<TagList>
|
||||||
|
<Tags>
|
||||||
|
<Color>#5555FF</Color>
|
||||||
|
<Name>Tag 0</Name>
|
||||||
|
</Tags>
|
||||||
|
</TagList>
|
||||||
|
<UseTheme>
|
||||||
|
<ColorList xmlns:d8p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
|
||||||
|
<d8p1:string>,,</d8p1:string>
|
||||||
|
</ColorList>
|
||||||
|
<Name></Name>
|
||||||
|
</UseTheme>
|
||||||
|
<Username>Nicolas</Username>
|
||||||
|
</User>
|
||||||
|
<User>
|
||||||
|
<Email>liammonchanin@gmail.com</Email>
|
||||||
|
<FavList />
|
||||||
|
<NoteList>
|
||||||
|
<Note z:Ref="i3" />
|
||||||
|
<Note z:Ref="i1" />
|
||||||
|
</NoteList>
|
||||||
|
<NoteTagged xmlns:d7p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
|
||||||
|
<d7p1:KeyValueOfNoteArrayOfTagsw0Ob5Kw8>
|
||||||
|
<d7p1:Key z:Ref="i3" />
|
||||||
|
<d7p1:Value />
|
||||||
|
</d7p1:KeyValueOfNoteArrayOfTagsw0Ob5Kw8>
|
||||||
|
</NoteTagged>
|
||||||
|
<Password>dd13d2e59703e108138db99aadebdc3e308e175d5649061baf2764ab6c039a9b</Password>
|
||||||
|
<Picture>defaultpicture.png</Picture>
|
||||||
|
<TagList>
|
||||||
|
<Tags>
|
||||||
|
<Color>#5555FF</Color>
|
||||||
|
<Name>Tag 2</Name>
|
||||||
|
</Tags>
|
||||||
|
</TagList>
|
||||||
|
<UseTheme>
|
||||||
|
<ColorList xmlns:d8p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
|
||||||
|
<d8p1:string>,,</d8p1:string>
|
||||||
|
</ColorList>
|
||||||
|
<Name></Name>
|
||||||
|
</UseTheme>
|
||||||
|
<Username>Liam</Username>
|
||||||
|
</User>
|
||||||
|
</Editors>
|
||||||
|
<ImageList />
|
||||||
|
<LogoPath>DefaultLogo.png</LogoPath>
|
||||||
|
<ModificationDate xmlns:d5p1="http://schemas.datacontract.org/2004/07/System" />
|
||||||
|
<Name>Note 0</Name>
|
||||||
|
<Owner>
|
||||||
|
<Email>leHeros@gmail.com</Email>
|
||||||
|
<FavList />
|
||||||
|
<NoteList>
|
||||||
|
<Note z:Ref="i1" />
|
||||||
|
</NoteList>
|
||||||
|
<NoteTagged xmlns:d6p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
|
||||||
|
<d6p1:KeyValueOfNoteArrayOfTagsw0Ob5Kw8>
|
||||||
|
<d6p1:Key z:Ref="i1" />
|
||||||
|
<d6p1:Value>
|
||||||
|
<Tags>
|
||||||
|
<Color>#5555FF</Color>
|
||||||
|
<Name>Tag 0</Name>
|
||||||
|
</Tags>
|
||||||
|
</d6p1:Value>
|
||||||
|
</d6p1:KeyValueOfNoteArrayOfTagsw0Ob5Kw8>
|
||||||
|
</NoteTagged>
|
||||||
|
<Password>2cbb89e6f9b003468ecfc7957b6c2a2da22c8e2f600cb115323800dc0da20467</Password>
|
||||||
|
<Picture>defaultpicture.png</Picture>
|
||||||
|
<TagList>
|
||||||
|
<Tags>
|
||||||
|
<Color>#5555FF</Color>
|
||||||
|
<Name>Tag 0</Name>
|
||||||
|
</Tags>
|
||||||
|
</TagList>
|
||||||
|
<UseTheme>
|
||||||
|
<ColorList xmlns:d7p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
|
||||||
|
<d7p1:string>,,</d7p1:string>
|
||||||
|
</ColorList>
|
||||||
|
<Name></Name>
|
||||||
|
</UseTheme>
|
||||||
|
<Username>Nicolas</Username>
|
||||||
|
</Owner>
|
||||||
|
<Text></Text>
|
||||||
|
<logoPath>DefaultLogo.png</logoPath>
|
||||||
|
<name>Note 0</name>
|
||||||
|
</Note>
|
||||||
|
</NoteList>
|
||||||
|
<NoteTagged xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
|
||||||
|
<d3p1:KeyValueOfNoteArrayOfTagsw0Ob5Kw8>
|
||||||
|
<d3p1:Key z:Ref="i1" xmlns:z="http://schemas.microsoft.com/2003/10/Serialization/" />
|
||||||
|
<d3p1:Value>
|
||||||
|
<Tags>
|
||||||
|
<Color>#5555FF</Color>
|
||||||
|
<Name>Tag 0</Name>
|
||||||
|
</Tags>
|
||||||
|
</d3p1:Value>
|
||||||
|
</d3p1:KeyValueOfNoteArrayOfTagsw0Ob5Kw8>
|
||||||
|
</NoteTagged>
|
||||||
|
<Password>2cbb89e6f9b003468ecfc7957b6c2a2da22c8e2f600cb115323800dc0da20467</Password>
|
||||||
|
<Picture>defaultpicture.png</Picture>
|
||||||
|
<TagList>
|
||||||
|
<Tags>
|
||||||
|
<Color>#5555FF</Color>
|
||||||
|
<Name>Tag 0</Name>
|
||||||
|
</Tags>
|
||||||
|
</TagList>
|
||||||
|
<UseTheme>
|
||||||
|
<ColorList xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
|
||||||
|
<d4p1:string>,,</d4p1:string>
|
||||||
|
</ColorList>
|
||||||
|
<Name></Name>
|
||||||
|
</UseTheme>
|
||||||
|
<Username>Nicolas</Username>
|
||||||
|
</User>
|
||||||
|
<User>
|
||||||
|
<Email>labsent@gmail.com</Email>
|
||||||
|
<FavList />
|
||||||
|
<NoteList>
|
||||||
|
<Note z:Ref="i2" xmlns:z="http://schemas.microsoft.com/2003/10/Serialization/" />
|
||||||
|
<Note z:Ref="i1" xmlns:z="http://schemas.microsoft.com/2003/10/Serialization/" />
|
||||||
|
</NoteList>
|
||||||
|
<NoteTagged xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
|
||||||
|
<d3p1:KeyValueOfNoteArrayOfTagsw0Ob5Kw8>
|
||||||
|
<d3p1:Key z:Ref="i2" xmlns:z="http://schemas.microsoft.com/2003/10/Serialization/" />
|
||||||
|
<d3p1:Value />
|
||||||
|
</d3p1:KeyValueOfNoteArrayOfTagsw0Ob5Kw8>
|
||||||
|
</NoteTagged>
|
||||||
|
<Password>fa7d77716ab4b614012aef71d589ef1bd018e1e25438c8546d1a2ce83b52c5c4</Password>
|
||||||
|
<Picture>defaultpicture.png</Picture>
|
||||||
|
<TagList>
|
||||||
|
<Tags>
|
||||||
|
<Color>#5555FF</Color>
|
||||||
|
<Name>Tag 1</Name>
|
||||||
|
</Tags>
|
||||||
|
</TagList>
|
||||||
|
<UseTheme>
|
||||||
|
<ColorList xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
|
||||||
|
<d4p1:string>,,</d4p1:string>
|
||||||
|
</ColorList>
|
||||||
|
<Name></Name>
|
||||||
|
</UseTheme>
|
||||||
|
<Username>Benjamin</Username>
|
||||||
|
</User>
|
||||||
|
<User>
|
||||||
|
<Email>liammonchanin@gmail.com</Email>
|
||||||
|
<FavList />
|
||||||
|
<NoteList>
|
||||||
|
<Note z:Ref="i3" xmlns:z="http://schemas.microsoft.com/2003/10/Serialization/" />
|
||||||
|
<Note z:Ref="i1" xmlns:z="http://schemas.microsoft.com/2003/10/Serialization/" />
|
||||||
|
</NoteList>
|
||||||
|
<NoteTagged xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
|
||||||
|
<d3p1:KeyValueOfNoteArrayOfTagsw0Ob5Kw8>
|
||||||
|
<d3p1:Key z:Ref="i3" xmlns:z="http://schemas.microsoft.com/2003/10/Serialization/" />
|
||||||
|
<d3p1:Value />
|
||||||
|
</d3p1:KeyValueOfNoteArrayOfTagsw0Ob5Kw8>
|
||||||
|
</NoteTagged>
|
||||||
|
<Password>dd13d2e59703e108138db99aadebdc3e308e175d5649061baf2764ab6c039a9b</Password>
|
||||||
|
<Picture>defaultpicture.png</Picture>
|
||||||
|
<TagList>
|
||||||
|
<Tags>
|
||||||
|
<Color>#5555FF</Color>
|
||||||
|
<Name>Tag 2</Name>
|
||||||
|
</Tags>
|
||||||
|
</TagList>
|
||||||
|
<UseTheme>
|
||||||
|
<ColorList xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
|
||||||
|
<d4p1:string>,,</d4p1:string>
|
||||||
|
</ColorList>
|
||||||
|
<Name></Name>
|
||||||
|
</UseTheme>
|
||||||
|
<Username>Liam</Username>
|
||||||
|
</User>
|
||||||
|
<User>
|
||||||
|
<Email>Macroutte@gmail.com</Email>
|
||||||
|
<FavList />
|
||||||
|
<NoteList>
|
||||||
|
<Note z:Id="i4" xmlns:z="http://schemas.microsoft.com/2003/10/Serialization/">
|
||||||
|
<Collaborators />
|
||||||
|
<CreationDate xmlns:d5p1="http://schemas.datacontract.org/2004/07/System" />
|
||||||
|
<Editors>
|
||||||
|
<User>
|
||||||
|
<Email>Macroutte@gmail.com</Email>
|
||||||
|
<FavList />
|
||||||
|
<NoteList>
|
||||||
|
<Note z:Ref="i4" />
|
||||||
|
</NoteList>
|
||||||
|
<NoteTagged xmlns:d7p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
|
||||||
|
<d7p1:KeyValueOfNoteArrayOfTagsw0Ob5Kw8>
|
||||||
|
<d7p1:Key z:Ref="i4" />
|
||||||
|
<d7p1:Value />
|
||||||
|
</d7p1:KeyValueOfNoteArrayOfTagsw0Ob5Kw8>
|
||||||
|
</NoteTagged>
|
||||||
|
<Password>2dd6f72e332902136f9f27bcae97ccf3dab2cfc45f5cea43a7fbb91847b04716</Password>
|
||||||
|
<Picture>defaultpicture.png</Picture>
|
||||||
|
<TagList>
|
||||||
|
<Tags>
|
||||||
|
<Color>#5555FF</Color>
|
||||||
|
<Name>Tag 3</Name>
|
||||||
|
</Tags>
|
||||||
|
</TagList>
|
||||||
|
<UseTheme>
|
||||||
|
<ColorList xmlns:d8p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
|
||||||
|
<d8p1:string>,,</d8p1:string>
|
||||||
|
</ColorList>
|
||||||
|
<Name></Name>
|
||||||
|
</UseTheme>
|
||||||
|
<Username>Brigitte</Username>
|
||||||
|
</User>
|
||||||
|
</Editors>
|
||||||
|
<ImageList />
|
||||||
|
<LogoPath>DefaultLogo.png</LogoPath>
|
||||||
|
<ModificationDate xmlns:d5p1="http://schemas.datacontract.org/2004/07/System" />
|
||||||
|
<Name>Note 3</Name>
|
||||||
|
<Owner>
|
||||||
|
<Email>Macroutte@gmail.com</Email>
|
||||||
|
<FavList />
|
||||||
|
<NoteList>
|
||||||
|
<Note z:Ref="i4" />
|
||||||
|
</NoteList>
|
||||||
|
<NoteTagged xmlns:d6p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
|
||||||
|
<d6p1:KeyValueOfNoteArrayOfTagsw0Ob5Kw8>
|
||||||
|
<d6p1:Key z:Ref="i4" />
|
||||||
|
<d6p1:Value />
|
||||||
|
</d6p1:KeyValueOfNoteArrayOfTagsw0Ob5Kw8>
|
||||||
|
</NoteTagged>
|
||||||
|
<Password>2dd6f72e332902136f9f27bcae97ccf3dab2cfc45f5cea43a7fbb91847b04716</Password>
|
||||||
|
<Picture>defaultpicture.png</Picture>
|
||||||
|
<TagList>
|
||||||
|
<Tags>
|
||||||
|
<Color>#5555FF</Color>
|
||||||
|
<Name>Tag 3</Name>
|
||||||
|
</Tags>
|
||||||
|
</TagList>
|
||||||
|
<UseTheme>
|
||||||
|
<ColorList xmlns:d7p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
|
||||||
|
<d7p1:string>,,</d7p1:string>
|
||||||
|
</ColorList>
|
||||||
|
<Name></Name>
|
||||||
|
</UseTheme>
|
||||||
|
<Username>Brigitte</Username>
|
||||||
|
</Owner>
|
||||||
|
<Text></Text>
|
||||||
|
<logoPath>DefaultLogo.png</logoPath>
|
||||||
|
<name>Note 3</name>
|
||||||
|
</Note>
|
||||||
|
</NoteList>
|
||||||
|
<NoteTagged xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
|
||||||
|
<d3p1:KeyValueOfNoteArrayOfTagsw0Ob5Kw8>
|
||||||
|
<d3p1:Key z:Ref="i4" xmlns:z="http://schemas.microsoft.com/2003/10/Serialization/" />
|
||||||
|
<d3p1:Value />
|
||||||
|
</d3p1:KeyValueOfNoteArrayOfTagsw0Ob5Kw8>
|
||||||
|
</NoteTagged>
|
||||||
|
<Password>2dd6f72e332902136f9f27bcae97ccf3dab2cfc45f5cea43a7fbb91847b04716</Password>
|
||||||
|
<Picture>defaultpicture.png</Picture>
|
||||||
|
<TagList>
|
||||||
|
<Tags>
|
||||||
|
<Color>#5555FF</Color>
|
||||||
|
<Name>Tag 3</Name>
|
||||||
|
</Tags>
|
||||||
|
</TagList>
|
||||||
|
<UseTheme>
|
||||||
|
<ColorList xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
|
||||||
|
<d4p1:string>,,</d4p1:string>
|
||||||
|
</ColorList>
|
||||||
|
<Name></Name>
|
||||||
|
</UseTheme>
|
||||||
|
<Username>Brigitte</Username>
|
||||||
|
</User>
|
||||||
|
</Database>
|
File diff suppressed because it is too large
Load Diff
@ -1,36 +0,0 @@
|
|||||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
|
||||||
# Visual Studio Version 17
|
|
||||||
VisualStudioVersion = 17.0.31611.283
|
|
||||||
MinimumVisualStudioVersion = 10.0.40219.1
|
|
||||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Biblioteque_de_Class", "Biblioteque_de_Class\Biblioteque_de_Class.csproj", "{92DD50C5-EEAD-44ED-AEFF-E21935725477}"
|
|
||||||
EndProject
|
|
||||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Notus_Persistance", "Notus_Persistence\Notus_Persistance.csproj", "{184478A9-E14F-42E0-B963-B3A4474C9C1C}"
|
|
||||||
EndProject
|
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Notus_UnitTest_Database", "Tests\Notus_UnitTest_Database\Notus_UnitTest_Database.csproj", "{EE443C17-B31D-4AD0-9141-920876E7DF79}"
|
|
||||||
EndProject
|
|
||||||
Global
|
|
||||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
|
||||||
Debug|Any CPU = Debug|Any CPU
|
|
||||||
Release|Any CPU = Release|Any CPU
|
|
||||||
EndGlobalSection
|
|
||||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
|
||||||
{92DD50C5-EEAD-44ED-AEFF-E21935725477}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
|
||||||
{92DD50C5-EEAD-44ED-AEFF-E21935725477}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
|
||||||
{92DD50C5-EEAD-44ED-AEFF-E21935725477}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
|
||||||
{92DD50C5-EEAD-44ED-AEFF-E21935725477}.Release|Any CPU.Build.0 = Release|Any CPU
|
|
||||||
{184478A9-E14F-42E0-B963-B3A4474C9C1C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
|
||||||
{184478A9-E14F-42E0-B963-B3A4474C9C1C}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
|
||||||
{184478A9-E14F-42E0-B963-B3A4474C9C1C}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
|
||||||
{184478A9-E14F-42E0-B963-B3A4474C9C1C}.Release|Any CPU.Build.0 = Release|Any CPU
|
|
||||||
{EE443C17-B31D-4AD0-9141-920876E7DF79}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
|
||||||
{EE443C17-B31D-4AD0-9141-920876E7DF79}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
|
||||||
{EE443C17-B31D-4AD0-9141-920876E7DF79}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
|
||||||
{EE443C17-B31D-4AD0-9141-920876E7DF79}.Release|Any CPU.Build.0 = Release|Any CPU
|
|
||||||
EndGlobalSection
|
|
||||||
GlobalSection(SolutionProperties) = preSolution
|
|
||||||
HideSolutionNode = FALSE
|
|
||||||
EndGlobalSection
|
|
||||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
|
||||||
SolutionGuid = {61F7FB11-1E47-470C-91E2-47F8143E1572}
|
|
||||||
EndGlobalSection
|
|
||||||
EndGlobal
|
|
@ -1,32 +0,0 @@
|
|||||||
using Biblioteque_de_Class;
|
|
||||||
|
|
||||||
namespace Notus_UnitTest_Database
|
|
||||||
{
|
|
||||||
[TestFixture]
|
|
||||||
public class GetLogoLinksTests
|
|
||||||
{
|
|
||||||
private Database database;
|
|
||||||
|
|
||||||
[SetUp]
|
|
||||||
public void Setup()
|
|
||||||
{
|
|
||||||
database = new Database();
|
|
||||||
database.GetDefaultLogoList().Add(new Logo("Logo1", "link1"));
|
|
||||||
database.GetDefaultLogoList().Add(new Logo("Logo2", "link2"));
|
|
||||||
database.GetDefaultLogoList().Add(new Logo("Logo3", "link3"));
|
|
||||||
}
|
|
||||||
|
|
||||||
[Test]
|
|
||||||
public void GetLogoLink_LogoExists_ReturnsLogoLink()
|
|
||||||
{
|
|
||||||
Assert.That(database.GetLogoLink("Logo2"), Is.EqualTo("link2"));
|
|
||||||
}
|
|
||||||
|
|
||||||
[Test]
|
|
||||||
public void GetLogoLink_LogoDoesNotExist_ThrowsException()
|
|
||||||
{
|
|
||||||
string logoName = "Logo4";
|
|
||||||
Assert.Throws<NotFoundException>(() => database.GetLogoLink(logoName));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,26 +0,0 @@
|
|||||||
using Biblioteque_de_Class;
|
|
||||||
namespace Notus_UnitTest_Note
|
|
||||||
{
|
|
||||||
[TestFixture]
|
|
||||||
public class VerifyOwnerTests
|
|
||||||
{
|
|
||||||
[Test]
|
|
||||||
public void VerifyOwner_UserIsOwner_ReturnsTrue()
|
|
||||||
{
|
|
||||||
User owner = new User("John", "john@example.com", "choco");
|
|
||||||
Note note = new Note("My Note", "path/to/logo.png", owner);
|
|
||||||
bool isOwner = note.VerifyOwner(owner);
|
|
||||||
Assert.IsTrue(isOwner);
|
|
||||||
}
|
|
||||||
|
|
||||||
[Test]
|
|
||||||
public void VerifyOwner_UserIsNotOwner_ReturnsFalse()
|
|
||||||
{
|
|
||||||
User owner = new User("John", "john@example.com", "choco");
|
|
||||||
User anotherUser = new User("Jane", "jane@example.com", "choco");
|
|
||||||
Note note = new Note("My Note", "path/to/logo.png", owner);
|
|
||||||
bool isOwner = note.VerifyOwner(anotherUser);
|
|
||||||
Assert.IsFalse(isOwner);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,24 +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="NUnit" Version="3.13.3" />
|
|
||||||
<PackageReference Include="NUnit3TestAdapter" Version="4.4.2" />
|
|
||||||
<PackageReference Include="NUnit.Analyzers" Version="3.6.1" />
|
|
||||||
<PackageReference Include="coverlet.collector" Version="3.2.0" />
|
|
||||||
</ItemGroup>
|
|
||||||
|
|
||||||
<ItemGroup>
|
|
||||||
<ProjectReference Include="..\..\Biblioteque_de_Class\Biblioteque_de_Class.csproj" />
|
|
||||||
</ItemGroup>
|
|
||||||
|
|
||||||
</Project>
|
|
@ -1,59 +0,0 @@
|
|||||||
using Biblioteque_de_Class;
|
|
||||||
|
|
||||||
namespace Notus_UnitTest_User
|
|
||||||
{
|
|
||||||
[TestFixture]
|
|
||||||
public class SearchNoteByNameTests
|
|
||||||
{
|
|
||||||
private User owner;
|
|
||||||
private string searchName;
|
|
||||||
|
|
||||||
[SetUp]
|
|
||||||
public void SetUp()
|
|
||||||
{
|
|
||||||
owner = new("Owner", "owner@example.com", "password");
|
|
||||||
owner.CreateNote("Note 1", "image1.png");
|
|
||||||
owner.CreateNote("Note 2", "image2.png");
|
|
||||||
owner.CreateNote("Another Note", "image3.png");
|
|
||||||
owner.AddFavorite(owner.GetNoteList()[0]);
|
|
||||||
owner.AddFavorite(owner.GetNoteList()[1]);
|
|
||||||
owner.AddFavorite(owner.GetNoteList()[2]);
|
|
||||||
searchName = "note";
|
|
||||||
}
|
|
||||||
|
|
||||||
[Test]
|
|
||||||
public void SearchNoteByName_WhenMatchingNotesExist_NotesReturned()
|
|
||||||
{
|
|
||||||
List<Note> result = owner.SearchNoteByName(owner.GetNoteList(),"note");
|
|
||||||
Assert.That(result, Has.Count.EqualTo(3));
|
|
||||||
CollectionAssert.Contains(result, owner.GetNoteList()[0]);
|
|
||||||
CollectionAssert.Contains(result, owner.GetNoteList()[1]);
|
|
||||||
CollectionAssert.Contains(result, owner.GetNoteList()[2]);
|
|
||||||
}
|
|
||||||
|
|
||||||
[Test]
|
|
||||||
public void SearchNoteByName_WhenNoMatchingNotesExist_EmptyListReturned()
|
|
||||||
{
|
|
||||||
List<Note> result = owner.SearchNoteByName(owner.GetNoteList(), "test");
|
|
||||||
Assert.That(result, Is.Empty);
|
|
||||||
}
|
|
||||||
|
|
||||||
[Test]
|
|
||||||
public void SearchFavoriteNoteByName_ShouldReturnMatchingNotes()
|
|
||||||
{
|
|
||||||
List<Note> searchedNotes = owner.SearchNoteByName(owner.GetFavList(), searchName);
|
|
||||||
Assert.That(searchedNotes, Has.Count.EqualTo(3));
|
|
||||||
CollectionAssert.Contains(searchedNotes, owner.GetNoteList()[0]);
|
|
||||||
CollectionAssert.Contains(searchedNotes, owner.GetNoteList()[1]);
|
|
||||||
CollectionAssert.Contains(searchedNotes, owner.GetNoteList()[2]);
|
|
||||||
}
|
|
||||||
|
|
||||||
[Test]
|
|
||||||
public void SearchFavoriteNoteByName_ShouldReturnEmptyList_WhenNoMatchFound()
|
|
||||||
{
|
|
||||||
searchName = "nonexistent";
|
|
||||||
List<Note> searchedNotes = owner.SearchNoteByName(owner.GetFavList(), searchName);
|
|
||||||
Assert.That(searchedNotes, Is.Empty);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -1 +0,0 @@
|
|||||||
global using NUnit.Framework;
|
|
@ -0,0 +1,223 @@
|
|||||||
|
using Biblioteque_de_Class;
|
||||||
|
namespace UnitTests_Model
|
||||||
|
{
|
||||||
|
[TestFixture]
|
||||||
|
public class Database_Tests
|
||||||
|
{
|
||||||
|
private Database database;
|
||||||
|
|
||||||
|
[SetUp]
|
||||||
|
public void Setup()
|
||||||
|
{
|
||||||
|
database = new Database();
|
||||||
|
database.UserList.Add(new User("John", "john@example.com", "password123"));
|
||||||
|
database.UserList.Add(new User("Jane", "jane@example.com", "choco"));
|
||||||
|
database.UserList.Add(new User("Alice", "alice@example.com", "choco"));
|
||||||
|
database.DefaultLogoList.Add(new Logo("Logo1", "link1"));
|
||||||
|
database.DefaultLogoList.Add(new Logo("Logo2", "link2"));
|
||||||
|
database.DefaultLogoList.Add(new Logo("Logo3", "link3"));
|
||||||
|
}
|
||||||
|
|
||||||
|
// SearchUser tests
|
||||||
|
|
||||||
|
[Test]
|
||||||
|
public void SearchUser_UserDoesNotExist_ThrowsException()
|
||||||
|
{
|
||||||
|
string searchName = "Bob";
|
||||||
|
Assert.Throws<NotFoundException>(() => database.SearchUser(searchName));
|
||||||
|
}
|
||||||
|
|
||||||
|
[Test]
|
||||||
|
public void SearchUser_CaseInsensitiveSearch_ReturnsMatchingUsers()
|
||||||
|
{
|
||||||
|
string searchName = "Alice";
|
||||||
|
User searchedUser = database.SearchUser(searchName);
|
||||||
|
Assert.That(searchedUser.Username, Is.EqualTo("Alice"));
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetLogoLink tests
|
||||||
|
[Test]
|
||||||
|
public void GetLogoLink_LogoExists_ReturnsLogoLink()
|
||||||
|
{
|
||||||
|
Assert.That(database.GetLogoLink("Logo2"), Is.EqualTo("link2"));
|
||||||
|
}
|
||||||
|
|
||||||
|
[Test]
|
||||||
|
public void GetLogoLink_LogoDoesNotExist_ThrowsException()
|
||||||
|
{
|
||||||
|
string logoName = "Logo4";
|
||||||
|
Assert.Throws<NotFoundException>(() => database.GetLogoLink(logoName));
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetUser tests
|
||||||
|
[Test]
|
||||||
|
public void GetUser_UserExists_ReturnsUser()
|
||||||
|
{
|
||||||
|
string userName = "Alice";
|
||||||
|
User user = database.GetUser(userName);
|
||||||
|
Assert.IsNotNull(user);
|
||||||
|
Assert.That(user.Username, Is.EqualTo(userName));
|
||||||
|
}
|
||||||
|
|
||||||
|
[Test]
|
||||||
|
public void GetUser_UserDoesNotExist_ThrowsException()
|
||||||
|
{
|
||||||
|
string userName = "Eve";
|
||||||
|
Assert.Throws<AlreadyUsedException>(() => database.GetUser(userName));
|
||||||
|
}
|
||||||
|
|
||||||
|
// ComparePassword tests
|
||||||
|
[Test]
|
||||||
|
public void ComparePassword_CorrectPassword_ReturnsTrue()
|
||||||
|
{
|
||||||
|
User user = database.UserList[0];
|
||||||
|
string password = "password123";
|
||||||
|
bool result = Database.ComparePassword(user, password);
|
||||||
|
Assert.That(result, Is.True);
|
||||||
|
}
|
||||||
|
|
||||||
|
[Test]
|
||||||
|
public void ComparePassword_IncorrectPassword_ReturnsFalse()
|
||||||
|
{
|
||||||
|
User user = database.UserList[0];
|
||||||
|
string password = "incorrectPassword";
|
||||||
|
bool result = Database.ComparePassword(user, password);
|
||||||
|
Assert.That(result, Is.False);
|
||||||
|
}
|
||||||
|
|
||||||
|
// FindEmail tests
|
||||||
|
[Test]
|
||||||
|
public void FindEmail_ExistingEmail_ReturnsTrue()
|
||||||
|
{
|
||||||
|
string email = "john@example.com";
|
||||||
|
bool result = database.FindEmail(email);
|
||||||
|
Assert.IsTrue(result);
|
||||||
|
}
|
||||||
|
|
||||||
|
[Test]
|
||||||
|
public void FindEmail_NonExistingEmail_ReturnsFalse()
|
||||||
|
{
|
||||||
|
string email = "olivedecarglass@example.com";
|
||||||
|
bool result = database.FindEmail(email);
|
||||||
|
Assert.IsFalse(result);
|
||||||
|
}
|
||||||
|
|
||||||
|
// AddUser tests
|
||||||
|
[Test]
|
||||||
|
public void AddUser_ValidUser_AddsUserToList()
|
||||||
|
{
|
||||||
|
User user = new User("Bob", "bob@example.com", "password123");
|
||||||
|
database.AddUser(user);
|
||||||
|
Assert.That(database.UserList, Contains.Item(user));
|
||||||
|
}
|
||||||
|
|
||||||
|
[Test]
|
||||||
|
public void AddUser_DuplicateUserName_ThrowsException()
|
||||||
|
{
|
||||||
|
User user = new User("John", "johnDae@example.com", "password123");
|
||||||
|
Assert.Throws<AlreadyUsedException>(() => database.AddUser(user));
|
||||||
|
}
|
||||||
|
|
||||||
|
[Test]
|
||||||
|
public void AddUser_DuplicateUserEmail_ThrowsException()
|
||||||
|
{
|
||||||
|
User user = new User("Bob", "john@example.com", "password123");
|
||||||
|
Assert.Throws<AlreadyUsedException>(() => database.AddUser(user));
|
||||||
|
}
|
||||||
|
|
||||||
|
// removeUser tests
|
||||||
|
[Test]
|
||||||
|
public void RemoveUser_ExistingUser_RemovesUserFromList()
|
||||||
|
{
|
||||||
|
User user = database.UserList[0];
|
||||||
|
database.RemoveUser(user);
|
||||||
|
Assert.That(database.UserList, !Contains.Item(user));
|
||||||
|
}
|
||||||
|
|
||||||
|
[Test]
|
||||||
|
public void RemoveUser_NotExistingUser_ThrowsException()
|
||||||
|
{
|
||||||
|
User user = new User("Bob", "bob@example.com", "password123");
|
||||||
|
Assert.Throws<NotFoundException>(() => database.RemoveUser(user));
|
||||||
|
}
|
||||||
|
|
||||||
|
// AddTheme tests
|
||||||
|
[Test]
|
||||||
|
public void AddTheme_ValidTheme_AddsThemeToList()
|
||||||
|
{
|
||||||
|
Theme theme = new Theme("Theme1", ",,,".Split().ToList());
|
||||||
|
database.AddTheme(theme);
|
||||||
|
Assert.That(database.ThemeList, Contains.Item(theme));
|
||||||
|
}
|
||||||
|
|
||||||
|
[Test]
|
||||||
|
public void AddTheme_DuplicateTheme_ThrowsException()
|
||||||
|
{
|
||||||
|
Theme theme = new Theme("Theme1", ",,,".Split().ToList());
|
||||||
|
database.ThemeList.Add(theme);
|
||||||
|
Assert.Throws<AlreadyExistException>(() => database.AddTheme(theme));
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetTheme tests
|
||||||
|
[Test]
|
||||||
|
public void GetTheme_ExistingTheme_ReturnsTheme()
|
||||||
|
{
|
||||||
|
Theme expectedTheme = new Theme("Theme1", ",,,".Split().ToList());
|
||||||
|
database.ThemeList.Add(expectedTheme);
|
||||||
|
|
||||||
|
Theme theme = database.GetTheme("Theme1");
|
||||||
|
Assert.IsNotNull(theme);
|
||||||
|
Assert.That(theme, Is.EqualTo(expectedTheme));
|
||||||
|
}
|
||||||
|
|
||||||
|
[Test]
|
||||||
|
public void GetTheme_NonExistingTheme_ReturnsNull()
|
||||||
|
{
|
||||||
|
Theme expectedTheme = new Theme("Theme1", ",,,".Split().ToList());
|
||||||
|
database.ThemeList.Add(expectedTheme);
|
||||||
|
Assert.Throws<NotFoundException>(() => database.GetTheme("NonExistingTheme"));
|
||||||
|
}
|
||||||
|
|
||||||
|
// ChangeUsername tests
|
||||||
|
[Test]
|
||||||
|
public void ChangeUsername_CorrectReplaceName_ChangesUsername()
|
||||||
|
{
|
||||||
|
User userSelected = database.UserList[0];
|
||||||
|
string newUsername = "duberlute";
|
||||||
|
|
||||||
|
database.ChangeUsername(userSelected, newUsername);
|
||||||
|
|
||||||
|
User updatedUser = database.UserList.Where(u => u.Username == newUsername).First();
|
||||||
|
Assert.IsNotNull(updatedUser);
|
||||||
|
Assert.That(updatedUser.Username, Is.EqualTo(newUsername));
|
||||||
|
}
|
||||||
|
|
||||||
|
[Test]
|
||||||
|
public void ChangeUsername_UsernameAlreadyUsed_ThrowsException()
|
||||||
|
{
|
||||||
|
User userNotSelected = database.UserList[2];
|
||||||
|
string newUsername = "Jane";
|
||||||
|
|
||||||
|
Assert.Throws<AlreadyUsedException>(() => database.ChangeUsername(userNotSelected, newUsername));
|
||||||
|
}
|
||||||
|
|
||||||
|
// VerifThemeNameNotTaken tests
|
||||||
|
[Test]
|
||||||
|
public void VerifThemeNameNotTaken_NameNotTaken_ReturnsTrue()
|
||||||
|
{
|
||||||
|
string themeName = "NewTheme";
|
||||||
|
bool result = database.VerifThemeNameNotTaken(themeName);
|
||||||
|
Assert.IsTrue(result);
|
||||||
|
}
|
||||||
|
|
||||||
|
[Test]
|
||||||
|
public void VerifThemeNameNotTaken_NameAlreadyTaken_ReturnsFalse()
|
||||||
|
{
|
||||||
|
Theme expectedTheme = new Theme("Theme1", ",,,".Split().ToList());
|
||||||
|
database.ThemeList.Add(expectedTheme);
|
||||||
|
string themeName = "Theme1";
|
||||||
|
bool result = database.VerifThemeNameNotTaken(themeName);
|
||||||
|
Assert.IsFalse(result);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in new issue