Esempio n. 1
0
        public void RetrieveNonExistentContainer()
        {
            EAV.Store.Clients.IContainerStoreClient client = factory.Create <EAV.Store.Clients.IContainerStoreClient>();

            var container = client.RetrieveContainer(-1);

            Assert.IsNull(container, "Unexpected container object retrieved.");
        }
Esempio n. 2
0
 public IHttpActionResult RetrieveContainer(int id)
 {
     try
     {
         return(Ok <EAV.Store.IStoreContainer>(containerClient.RetrieveContainer(id)));
     }
     catch (Exception ex)
     {
         return(InternalServerError(ex));
     }
 }
Esempio n. 3
0
        public void RetrieveRandomContainer()
        {
            var dbContainer = SelectRandomItem(this.DbContext.Containers);

            if (dbContainer != null)
            {
                EAV.Store.Clients.IContainerStoreClient client = factory.Create <EAV.Store.Clients.IContainerStoreClient>();

                var container = client.RetrieveContainer(dbContainer.Container_ID);

                Assert.IsNotNull(container, "Failed to retrieve container {0}.", dbContainer.Container_ID);
                Assert.AreEqual(dbContainer.Container_ID, container.ContainerID, "Container ID values do not match.");
            }
            else
            {
                Assert.Inconclusive("No containers were found in the database.");
            }
        }