Beispiel #1
0
        public async Task Can_Create_RangeTest_Async()
        {
            var db = CreatePocoDynamo();

            await db.CreateTableIfMissingAsync(DynamoMetadata.RegisterTable <RangeTest>());

            var createdDate = DateTime.UtcNow;
            await db.PutItemAsync(new RangeTest {
                Id          = "test",
                CreatedDate = createdDate,
                Data        = "Data",
            });

            var dto = await db.GetItemAsync <RangeTest>("test", createdDate);

            dto.PrintDump();

            Assert.That(dto.Id, Is.EqualTo("test"));
            Assert.That(dto.Data, Is.EqualTo("Data"));
            Assert.That(dto.CreatedDate, Is.EqualTo(createdDate)
                        .Within(TimeSpan.FromMinutes(1)));
        }
 public DynamoDbSequenceSource(IPocoDynamo db)
 {
     this.db    = db;
     this.table = DynamoMetadata.RegisterTable <Seq>();
 }