namespace XFEEDToolBox.Plugin; internal static unsafe partial class Navigation { private static uint CommerceBatchSelfTest() { uint passed=0; var work=new CommerceReadRequest{kind=1,commodity=128049172,delta=192,before=0,after=192,totalBefore=0,creditsBefore=25000000,price=6000}; if(CommerceReceiptFixture(work,"{\"credits\":23848000,\"inventory\":[{\"commodity\":\"uranium\",\"qty\":192}]}"))passed|=1; if(!CommerceReceiptFixture(work,"{\"credits\":24994000,\"inventory\":[{\"commodity\":\"uranium\",\"qty\":192}]}"))passed|=2; if(!CommerceReceiptFixture(work,"{\"credits\":23848000,\"inventory\":[{\"commodity\":\"uranium\",\"qty\":192,\"stolen\":true}]}"))passed|=4; work.delta=-192;work.before=192;work.after=0;work.price=57104;work.creditsBefore=23848000; if(CommerceReceiptFixture(work,"{\"credits\":34811968,\"inventory\":[]}"))passed|=8; work.delta=193;if(!CommerceExpectedCredits(work,out _))passed|=16; work.delta=0;if(!CommerceExpectedCredits(work,out _))passed|=32; work.delta=192;work.price=6000;work.creditsBefore=100000;if(!CommerceExpectedCredits(work,out _))passed|=64; if(CommerceBatchCommodity(128049172)&&CommerceBatchCommodity(128049189)&&CommerceBatchCommodity(128049197)&&CommerceBatchCommodity(128673851)&&!CommerceBatchCommodity(128049244))passed|=128; return passed; } #if PLUGIN_NAVIGATION [UnmanagedCallersOnly(EntryPoint="XFENavigationCommerceBatchSelfTest")] internal static uint ExportCommerceBatchSelfTest()=>RunTest(CommerceBatchSelfTest); #endif }