예제 #1
0
        public void GetFileNullTest()
        {
            String     assetID = null;
            ContentAPI client  = ConstructServiceClient();

            Byte[] content = client.GetFile(assetID);
        }
예제 #2
0
        public void GetFileEmptyTest()
        {
            String     assetID = String.Empty;
            ContentAPI client  = ConstructServiceClient();

            Byte[] content = client.GetFile(assetID);
        }
예제 #3
0
        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);
            }
        }