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 TestCreateFromConfiguration()
        {
            var cfg = new CacheClientConfiguration("a");
            var cache = Client.CreateCache<int, int>(cfg);
            AssertExtensions.ReflectionEqual(cfg, cache.GetConfiguration());
            var ex = Assert.Throws<IgniteClientException>(() => Client.CreateCache<int, int>(cfg));
            Assert.AreEqual(
                "Failed to start cache (a cache with the same name is already started): a", ex.Message);
            Assert.AreEqual(ClientStatusCode.CacheExists, ex.StatusCode);
            cfg = GetFullCacheConfiguration("b");
            cache = Client.CreateCache<int, int>(cfg);
            AssertClientConfigsAreEqual(cfg, cache.GetConfiguration());
        }
[ Test ] public void TestCreateFromConfiguration ( ) { var cfg = new CacheClientConfiguration ( " " ) ; var cache = Client . CreateCache < int , int > ( cfg ) ; AssertExtensions . ReflectionEqual ( cfg , cache . GetConfiguration ( ) ) ; var ex = Assert . Throws < IgniteClientException > ( ( ) => Client . CreateCache < int , int > ( cfg ) ) ; Assert . AreEqual ( " " , ex . Message ) ; Assert . AreEqual ( ClientStatusCode . CacheExists , ex . StatusCode ) ; cfg = GetFullCacheConfiguration ( " " ) ; cache = Client . CreateCache < int , int > ( cfg ) ; AssertClientConfigsAreEqual ( cfg , cache . GetConfiguration ( ) ) ; }
Tests cache creation from configuration.
Tests cache creation from configuration .
// Default config. // Create when exists. // Custom config.