Created
May 15, 2023 20:40
-
-
Save kulvirTAC/b5b9b5a11a46930f5a158e24245870f8 to your computer and use it in GitHub Desktop.
Order Missing Inventory Test
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// <summary> | |
/// Test error when inventory is missing from Acumatica | |
/// when adding order | |
/// </summary> | |
[Fact] | |
public void OrderMissingInventoryTest() | |
{ | |
try | |
{ | |
string createdOrder = service.AddOrder(Properties.Resources.OrderMissingInventory); | |
// Should error out and not reach the next line of code | |
dynamic acumaticaOrder = JsonConvert.DeserializeObject(createdOrder); | |
} | |
catch (HttpRequestException exc) | |
{ | |
output.WriteLine(exc.Message); | |
Assert.Contains("InventoryID", exc.Message); | |
} | |
catch (Exception exc) | |
{ | |
Assert.False(true, exc.Message); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment