Exemplo n.º 1
0
 public void CreateStorageFailWithAPIResponse()
 {
     foreach (var statusCode in this.StatusCodes)
     {
         mockService.Setup(_ => _.Add(It.IsAny <AddStorageParameter>())).Throws(BaseMockResponse.ErrorResponse(statusCode));
         var ex = Assert.Throws <UizaException>(() => mockService.Object.Add(StorageMockParameter.CreateInValidStorageParameter()));
         Assert.Equal(statusCode, ex.UizaInnerException.Code);
     }
 }