modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/CacheNearTest.cs
/// <summary>
/// Tests near cache on the client node.
/// </summary>
Tests near cache on the client node.
Tests near cache on the client node .
[Test]
        public void TestCreateCacheWithNearConfigOnClientNode()
        {
            const string cacheName = "client_with_near_cache";
            var cfg = new IgniteConfiguration(TestUtils.GetTestConfiguration())
            {
                ClientMode = true,
                IgniteInstanceName = "clientGrid",
                IncludedEventTypes = new[] {EventType.CacheEntryCreated}
            };
            using (var clientGrid = Ignition.Start(cfg))
            {
                var cache = clientGrid.CreateCache<int, string>(new CacheConfiguration(cacheName), 
                    new NearCacheConfiguration());
                AssertCacheIsNear(cache);
                cache[1] = "1";
                Assert.AreEqual("1", cache[1]);
                var cache2 = clientGrid.GetOrCreateCache<int, string>(new CacheConfiguration(cacheName),
                    new NearCacheConfiguration());
                Assert.AreEqual("1", cache2[1]);
            }
        }
[ Test ] public void TestCreateCacheWithNearConfigOnClientNode ( ) { const string cacheName = " " ; var cfg = new IgniteConfiguration ( TestUtils . GetTestConfiguration ( ) ) { ClientMode = true , IgniteInstanceName = " " , IncludedEventTypes = new [ ] { EventType . CacheEntryCreated } } ; using ( var clientGrid = Ignition . Start ( cfg ) ) { var cache = clientGrid . CreateCache < int , string > ( new CacheConfiguration ( cacheName ) , new NearCacheConfiguration ( ) ) ; AssertCacheIsNear ( cache ) ; cache [ 1 ] = " " ; Assert . AreEqual ( " " , cache [ 1 ] ) ; var cache2 = clientGrid . GetOrCreateCache < int , string > ( new CacheConfiguration ( cacheName ) , new NearCacheConfiguration ( ) ) ; Assert . AreEqual ( " " , cache2 [ 1 ] ) ; } }
Tests near cache on the client node.
Tests near cache on the client node .