public void TestAssetRequest_Respond_AssetError_AssetError_AssetAlreadySetException() { var req = new AssetRequest(_asset.Id, a => { }, a => { }); req.Respond(new AssetError()); Assert.Throws <AssetAlreadySetException>(() => req.Respond(new AssetError())); }
public void TestAssetRequest_Respond_StratusAsset_StratusAsset_AssetAlreadySetException() { var req = new AssetRequest(_asset.Id, a => { }, a => { }); req.Respond(_asset); Assert.Throws <AssetAlreadySetException>(() => req.Respond(_asset)); }
public void TestAssetRequest_Respond_AssetError_CallsHandler() { var gotCallback = false; var req = new AssetRequest(_asset.Id, a => { }, a => gotCallback = true); req.Respond(new AssetError()); Assert.True(gotCallback); }
public void TestAssetRequest_Respond_StratusAsset_CallsHandler() { var gotCallback = false; var req = new AssetRequest(_asset.Id, a => gotCallback = true, a => { }); req.Respond(_asset); Assert.True(gotCallback); }
public void TestAssetRequest_Respond_StratusAsset_DoesNotThrow() { var req = new AssetRequest(_asset.Id, a => { }, a => { }); Assert.DoesNotThrow(() => req.Respond(_asset)); }
public void TestAssetRequest_Respond_StratusAsset_WrongId_AssetIdMismatchException() { var req = new AssetRequest(Guid.NewGuid(), a => { }, a => { }); Assert.Throws <AssetIdMismatchException>(() => req.Respond(_asset)); }
public void TestAssetRequest_Respond_StratusAsset_null_ArgumentNullException() { var req = new AssetRequest(Guid.NewGuid(), a => { }, a => { }); Assert.Throws <ArgumentNullException>(() => req.Respond(null)); }