test exception
continuous-integration/drone/push Build is failing Details

pull/19/head
Matheo THIERRY 2 years ago
parent 2fffa70ff3
commit 554431190d

@ -6,10 +6,16 @@ using System.Threading.Tasks;
namespace Biblioteque_de_Class
{
[Serializable]
public class NotAllowedException : Exception
{
public NotAllowedException(string message) : base(message)
{
}
protected NotAllowedException(SerializationInfo info, StreamingContext context) : base(info, context)
{
}
}
public class AlreadyUsedException : Exception

@ -102,6 +102,7 @@ namespace Biblioteque_de_Class
{
if (VerifyOwner(owner)) { Collaborators.Add(user); }
else { throw new NotAllowedException("User is not the owner"); }
user.GetNoteList().Add(this);
}
/// <summary>
@ -111,6 +112,7 @@ namespace Biblioteque_de_Class
{
if (VerifyOwner(owner)) { Collaborators.Remove(user); }
else { throw new NotAllowedException("User is not the owner"); }
user.GetNoteList().Remove(this);
}
/// <summary>

Loading…
Cancel
Save