public void RetrieveAllInstances()
        {
            EAV.Store.Clients.IInstanceStoreClient client = factory.Create <EAV.Store.Clients.IInstanceStoreClient>();

            int nDbInstances     = this.DbContext.Instances.Where(it => it.Parent_Instance_ID == null).Count();
            int nClientInstances = client.RetrieveRootInstances(null, null).Count();

            Assert.AreEqual(nDbInstances, nClientInstances, "The number of instances retrieved by the client does not match the number in the database.");
        }
Beispiel #2
0
 public IHttpActionResult RetrieveRootInstances(int id)
 {
     try
     {
         return(Ok <IEnumerable <EAV.Store.IStoreInstance> >(instanceClient.RetrieveRootInstances(ContainerID, id)));
     }
     catch (Exception ex)
     {
         return(InternalServerError(ex));
     }
 }