modules/platforms/dotnet/Apache.Ignite.Core.Tests/Client/Cache/CreateCacheTest.cs
/// <summary>
/// Tests cache creation from configuration.
/// </summary>
Tests cache creation from configuration.
Tests cache creation from configuration .
[Test]
        public void TestGetOrCreateFromConfiguration()
        {
            var cfg = new CacheClientConfiguration("a");
            var cache = Client.GetOrCreateCache<int, int>(cfg);
            AssertExtensions.ReflectionEqual(cfg, cache.GetConfiguration());
            cache[1] = 1;
            cache = Client.GetOrCreateCache<int, int>("a");
            Assert.AreEqual(1, cache[1]);
            cfg = GetFullCacheConfiguration("b");
            cache = Client.GetOrCreateCache<int, int>(cfg);
            AssertClientConfigsAreEqual(cfg, cache.GetConfiguration());
        }
[ Test ] public void TestGetOrCreateFromConfiguration ( ) { var cfg = new CacheClientConfiguration ( " " ) ; var cache = Client . GetOrCreateCache < int , int > ( cfg ) ; AssertExtensions . ReflectionEqual ( cfg , cache . GetConfiguration ( ) ) ; cache [ 1 ] = 1 ; cache = Client . GetOrCreateCache < int , int > ( " " ) ; Assert . AreEqual ( 1 , cache [ 1 ] ) ; cfg = GetFullCacheConfiguration ( " " ) ; cache = Client . GetOrCreateCache < int , int > ( cfg ) ; AssertClientConfigsAreEqual ( cfg , cache . GetConfiguration ( ) ) ; }
Tests cache creation from configuration.
Tests cache creation from configuration .
// Default configur. // Create when exists. // Custom config.