Ejemplo n.º 1
0
        public async Task CanSaveJObjectAndLoadJObjectWithInnerPoco(ITablesClient writer, ITablesClient reader)
        {
            if (UseCosmos && writer is Extension && reader is ExtensionT1)
            {
                Assert.Ignore("https://github.com/Azure/azure-webjobs-sdk/issues/2813");
            }
            var testEntity = FormatJObject(new TestEntity(true)
            {
                PartitionKey = PartitionKey,
                RowKey       = RowKey,
                NestedEntity = new TestEntity(true),
                // V4 can't handle longs in JObject
                UInt64TypeProperty         = int.MaxValue,
                Int64TypeProperty          = int.MaxValue,
                NullableUInt64TypeProperty = int.MaxValue,
                NullableInt64TypeProperty  = int.MaxValue,
            });

            await writer.Write(this, testEntity);

            var outputA = await writer.Read <JObject>(this);

            var outputB = await reader.Read <JObject>(this);

            AssertAreEqual(outputA, outputB);
        }
Ejemplo n.º 2
0
        public async Task CanSavePocoAndLoadPocoWithNullablesSet(ITablesClient writer, ITablesClient reader)
        {
            var testEntity = new TestEntity(true)
            {
                PartitionKey = PartitionKey,
                RowKey       = RowKey
            };

            await writer.Write(this, testEntity);

            var output = await reader.Read <TestEntity>(this);

            AssertAreEqual(testEntity, output);
        }
Ejemplo n.º 3
0
        public async Task CanSavePocoAndLoadPoco(ITablesClient writer, ITablesClient reader)
        {
            var testEntity = new TestEntity()
            {
                PartitionKey = PartitionKey,
                RowKey       = RowKey,
                // SDK can't handle overflow in longs
                UInt64TypeProperty = long.MaxValue,
                Int64TypeProperty  = long.MaxValue,
            };

            await writer.Write(this, testEntity);

            var output = await reader.Read <TestEntity>(this);

            AssertAreEqual(testEntity, output);
        }