public void GetFileNullTest() { String assetID = null; ContentAPI client = ConstructServiceClient(); Byte[] content = client.GetFile(assetID); }
public void GetFileEmptyTest() { String assetID = String.Empty; ContentAPI client = ConstructServiceClient(); Byte[] content = client.GetFile(assetID); }
public void GetFileUnknownTest() { String assetID = "0"; ContentAPI client = ConstructServiceClient(); try { Byte[] content = client.GetFile(assetID); Assert.Fail("A file with an invalid asset ID should not have been retrieved."); } catch (OnDemandClientException odce) { Assert.AreEqual <HttpStatusCode>(HttpStatusCode.NotFound, odce.HttpStatusCode); Assert.AreEqual <Int32>(0, odce.ReasonCode); Assert.IsNotNull(odce.SimpleMessage); Assert.IsNotNull(odce.DetailedMessage); } }