Exemple #1
0
        public async Task Should_return_schema_from_name_if_string_not_guid()
        {
            A.CallTo(() => appProvider.GetSchemaAsync(appId, "my-schema"))
            .Returns(schema);

            var result = await sut.GetSchemaAsync(context.WithSchemaName("my-schema"));

            Assert.Equal(schema, result);
        }
Exemple #2
0
        public async Task <IResultList <IContentEntity> > QueryContentsAsync(string schemaIdOrName, string query)
        {
            var result = await contentQuery.QueryAsync(context.WithSchemaName(schemaIdOrName), query);

            foreach (var content in result)
            {
                cachedContents[content.Id] = content;
            }

            return(result);
        }