Exemplo n.º 1
0
      public async Task GetAsync_ObjectInsertedContainsDateTimeOutOfEdmRange_DateTimePropretyIsRetrievedDynamicallyAsDateTime()
      {
         var item = new DecoratedItemWithDateTime()
         {
            CreationDate = new DateTime( 1000, 1, 1, 1, 1, 1, 1, DateTimeKind.Local ),
            Id = "pk",
            Name = "rk",
         };

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

         var retrievedObject = await _tableStorageProvider.GetAsync( _tableName, "pk", "rk" );
         Assert.AreEqual( new DateTime( 1000, 1, 1, 1, 1, 1, 1, DateTimeKind.Local ), retrievedObject.CreationDate.ToLocalTime() );
      }
Exemplo n.º 2
0
        public async Task GetAsync_ObjectInsertedContainsDateTimeOutOfEdmRange_DateTimePropretyIsRetrievedDynamicallyAsDateTime()
        {
            var item = new DecoratedItemWithDateTime()
            {
                CreationDate = new DateTime(1000, 1, 1, 1, 1, 1, 1, DateTimeKind.Local),
                Id           = "pk",
                Name         = "rk",
            };

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

            var retrievedObject = await _tableStorageProvider.GetAsync(_tableName, "pk", "rk");

            Assert.AreEqual(new DateTime(1000, 1, 1, 1, 1, 1, 1, DateTimeKind.Local), retrievedObject.CreationDate.ToLocalTime());
        }