public void GetShipment_Throws_HttpException()
 {
     var api = new CaseStackApiMock();
     var exception = Assert.Throws<HttpException>(() => api.GetShipment(-1));
     Assert.True(500 == exception.GetHttpCode());
 }
 public void SaveAsync_BadGatewaty_Throws_HttpException()
 {
     var api = new CaseStackApiMock();
     var shipment = api.GetShipment(0);
     shipment.shipment_id = "-2";
     Assert.ThrowsAsync<HttpException>(() => shipment.SaveAsync());
 }
 public void Save_No_Error()
 {
     var api = new CaseStackApiMock();
     var shipment = api.GetShipment(0);
     shipment.Save();
 }
 public async Task SaveAsync_No_Error()
 {
     var api = new CaseStackApiMock();
     var shipment = api.GetShipment(0);
     await shipment.SaveAsync();
 }
 public void GetShipment_Data_Valid()
 {
     var api = new CaseStackApiMock();
     var shipment = api.GetShipment(0);
     Assert.IsNotNull(shipment);
 }