コード例 #1
0
        public void NoIndexedLocationInsertsCreatesNewIndexedLocation()
        {
            var indexedLocation = "indexedLocation";
            var service         = new IndexedLocation("TestMosaicDatabase");
            var request         = new IndexedLocationRequest()
            {
                IndexedLocation = indexedLocation
            };

            service.UpdateIndexedLocation(request);

            var response = service.ReadIndexedLocation();

            Assert.AreEqual(indexedLocation, response.IndexedLocation);
        }
コード例 #2
0
        public void OneIndexedLocationInsertReplacesIndexedLocation()
        {
            var oldIndexedLocation = "oldIndexedLocation";
            var newIndexedLocation = "newIndexedLocation";
            var service            = new IndexedLocation("TestMosaicDatabase");

            var request1 = new IndexedLocationRequest()
            {
                IndexedLocation = oldIndexedLocation
            };

            service.UpdateIndexedLocation(request1);

            var request2 = new IndexedLocationRequest()
            {
                IndexedLocation = newIndexedLocation
            };

            service.UpdateIndexedLocation(request2);

            var response = service.ReadIndexedLocation();

            Assert.AreEqual(newIndexedLocation, response.IndexedLocation);
        }