public void TestGetPeople()
        {
            var samples = new HTTPResponse();
            var model   = samples.GetMetadata(_localBaseUri + "$metadata");
            var mreader = samples.GetResponse(_localBaseUri + "Person", _atomFormat, _baseVersion, _maxVersion, model);

            CheckResponse(mreader);
        }
        public void TestBaseballStats()
        {
            var baseBallStatsUri = "http://baseball-stats.info/OData/baseballstats.svc/";
            var samples          = new HTTPResponse();
            var model            = samples.GetMetadata(baseBallStatsUri + "$metadata");

            samples.ExecuteBaseballStatsRequest(model, "BaseballStatsRequest");
        }
        public void TestGetNetflixData()
        {
            HTTPResponse samples = new HTTPResponse();
            //FileResponseSamples fileResponseSamples = new FileResponseSamples();
            string       atomFormat           = "application/atom+xml";
            string       jsonFormat           = "application/json";
            string       localBaseUri         = "http://localhost:8090/odata";
            string       netflixBaseUri       = "http://odata.netflix.com/v2/Catalog/";
            string       stackoverflowBaseUri = "http://data.stackexchange.com/stackoverflow/atom/";
            ODataVersion baseVersion          = ODataVersion.V2;
            ODataVersion maxVersion           = ODataVersion.V3;

            var model = samples.GetMetadata(netflixBaseUri + "$metadata");

            samples.ExecuteNetflixRequest(model, "NetflixGenres");
        }
        public void TestModel()
        {
            var samples = new HTTPResponse();
            var model   = samples.GetMetadata(_localBaseUri + "$metadata");

            Assert.IsNotNull(model);

            var entitySets =
                model.EntityContainers.First().Elements.Where(
                    e => e.ContainerElementKind.Equals(EdmContainerElementKind.EntitySet)).ToList();

            Assert.IsNotNull(entitySets);
            Assert.AreEqual(_entitySets.Count, entitySets.Count);
            foreach (var es in entitySets)
            {
                Assert.IsTrue(_entitySets.Contains(es.Name));
            }


            var associationSets =
                model.EntityContainers.First().Elements.Where(
                    e => e.ContainerElementKind.Equals(EdmContainerElementKind.AssociationSet)).ToList();

            Assert.IsNotNull(associationSets);
            Assert.AreEqual(_associationSets.Count, associationSets.Count);
            foreach (var assoc in associationSets)
            {
                Assert.IsTrue(_associationSets.Contains(assoc.Name));
            }

            var functionImports =
                model.EntityContainers.First().Elements.Where(
                    e => e.ContainerElementKind.Equals(EdmContainerElementKind.FunctionImport)).ToList();

            Assert.IsNotNull(functionImports);
            Assert.AreEqual(0, functionImports.Count);
        }
 public void TestGetArticles()
 {
     var samples = new HTTPResponse();
     var model   = samples.GetMetadata(_localBaseUri + "$metadata");
     var mreader = samples.GetResponse(_localBaseUri + "Article", _atomFormat, _baseVersion, _maxVersion, model);
 }