Currently if you want to create exceptions for unit tests, when you are using WebAssembly library, you have to do the following:
public static TheoryData CriticalDependencyExceptions()
{
string someMessage = GetRandomMessage();
var someResponseMessage = new HttpResponseMessage();
return new TheoryData<Xeption>()
{
new HttpResponseUrlNotFoundException(
someResponseMessage,
someMessage),
new HttpResponseUnauthorizedException(
someResponseMessage,
someMessage),
new HttpResponseForbiddenException(
someResponseMessage,
someMessage)
};
}
At the same time Core project made it easier to create the above exceptions without response message and message.
Currently if you want to create exceptions for unit tests, when you are using
WebAssembly
library, you have to do the following:At the same time Core project made it easier to create the above exceptions without response message and message.