modules/platforms/dotnet/Apache.Ignite.Core.Tests/Client/Cache/CreateCacheTest.cs
/// <summary>
/// Tests cache creation from partial configuration.
/// </summary>
Tests cache creation from partial configuration.
Tests cache creation from partial configuration .
[Test]
        public void TestCreateFromPartialConfiguration()
        {
            var cfg = new CacheClientConfiguration("a") {Backups = 7};
            var client = (IgniteClient) Client;
            client.Socket.DoOutInOp<object>(ClientOp.CacheCreateWithConfiguration, s =>
            {
                var w = client.Marshaller.StartMarshal(s);
                w.WriteInt(2 + 2 + 6 + 2 + 4);  
                w.WriteShort(2);  
                w.WriteShort(3);  
                w.WriteInt(cfg.Backups);
                w.WriteShort(0);  
                w.WriteString(cfg.Name);
            }, null);
            var cache = new CacheClient<int, int>(client, cfg.Name);
            AssertExtensions.ReflectionEqual(cfg, cache.GetConfiguration());
        }
[ Test ] public void TestCreateFromPartialConfiguration ( ) { var cfg = new CacheClientConfiguration ( " " ) { Backups = 7 } ; var client = ( IgniteClient ) Client ; client . Socket . DoOutInOp < object > ( ClientOp . CacheCreateWithConfiguration , s => { var w = client . Marshaller . StartMarshal ( s ) ; w . WriteInt ( 2 + 2 + 6 + 2 + 4 ) ; w . WriteShort ( 2 ) ; w . WriteShort ( 3 ) ; w . WriteInt ( cfg . Backups ) ; w . WriteShort ( 0 ) ; w . WriteString ( cfg . Name ) ; } , null ) ; var cache = new CacheClient < int , int > ( client , cfg . Name ) ; AssertExtensions . ReflectionEqual ( cfg , cache . GetConfiguration ( ) ) ; }
Tests cache creation from partial configuration.
Tests cache creation from partial configuration .
// Default config. // Create cache directly through a socket with only some config properties provided. // config length in bytes. // 2 properties. // backups opcode. // name opcode.