Adding guards and more tests (#68)

* Adding single entity by spec method to repository

* Adding guards and more unit tests
This commit is contained in:
Steve Smith
2017-10-30 11:53:29 -07:00
committed by GitHub
parent 3d46c80cff
commit b864be9265
10 changed files with 119 additions and 1 deletions

View File

@@ -0,0 +1,23 @@
using System;
namespace ApplicationCore.Exceptions
{
public class BasketNotFoundException : Exception
{
public BasketNotFoundException(int basketId) : base($"No basket found with id {basketId}")
{
}
protected BasketNotFoundException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) : base(info, context)
{
}
public BasketNotFoundException(string message) : base(message)
{
}
public BasketNotFoundException(string message, Exception innerException) : base(message, innerException)
{
}
}
}