Esempio n. 1
0
        public void Throws_On_Unsupporeted_Id()
        {
            var s = new InMemoryProjectionsStore();
            var d = new DocumentWithUnsupportedId {
                Id = 1
            };

            Assert.That(async() => { await s.StoreAsync(d); }, Throws.ArgumentException);
        }
Esempio n. 2
0
        public async Task Can_Store_Document_With_Numeric_Id()
        {
            var s = new InMemoryProjectionsStore();
            var d = new DocumentWithNumericId {
                Id = 1
            };
            await s.StoreAsync(d);

            var loaded = await s.LoadAsync <DocumentWithNumericId>("1");

            Assert.That(loaded.Id == 1);
        }