Inheritance: System.Dynamic.DynamicObject
Ejemplo n.º 1
0
      public async Task GetAsync_ObjectInsertedIsInheritsDynamicObject_RetrievedProperly()
      {
         dynamic item = new DynamicPropertyBag();
         item.Foo = "test";
         item.Bar = 1;

         string partitionKey = "partitionKey";
         string rowKey = "rowKey";
         _tableStorageProvider.Add( _tableName, item, partitionKey, rowKey );
         await _tableStorageProvider.SaveAsync();

         dynamic result = await _tableStorageProvider.GetAsync( _tableName, partitionKey, rowKey );

         Assert.AreEqual( item.Foo, result.Foo );
         Assert.AreEqual( item.Bar, result.Bar );
      }
Ejemplo n.º 2
0
        public async Task GetAsync_ObjectInsertedIsInheritsDynamicObject_RetrievedProperly()
        {
            dynamic item = new DynamicPropertyBag();

            item.Foo = "test";
            item.Bar = 1;

            string partitionKey = "partitionKey";
            string rowKey       = "rowKey";

            _tableStorageProvider.Add(_tableName, item, partitionKey, rowKey);
            await _tableStorageProvider.SaveAsync();

            dynamic result = await _tableStorageProvider.GetAsync(_tableName, partitionKey, rowKey);

            Assert.AreEqual(item.Foo, result.Foo);
            Assert.AreEqual(item.Bar, result.Bar);
        }