public async Task Should_return_schema_from_id_if_string_is_guid()
        {
            SetupSchemaFound();

            var result = await sut.GetSchemaOrThrowAsync(requestContext, schemaId.Id.ToString());

            Assert.Equal(schema, result);
        }
Esempio n. 2
0
        public async Task GetSchemaOrThrowAsync_should_return_schema_from_guid_string()
        {
            var input = schemaId.Id.ToString();

            var ctx = CreateContext(isFrontend: false, allowSchema: true);

            A.CallTo(() => appProvider.GetSchemaAsync(appId.Id, schemaId.Id, true))
            .Returns(schema);

            var result = await sut.GetSchemaOrThrowAsync(ctx, input);

            Assert.Equal(schema, result);
        }
        public async Task Should_get_schema_from_guid_string()
        {
            var input = schemaId.Id.ToString();

            var requestContext = CreateContext();

            A.CallTo(() => appProvider.GetSchemaAsync(appId.Id, schemaId.Id, true))
            .Returns(schema);

            var result = await sut.GetSchemaOrThrowAsync(requestContext, input);

            Assert.Equal(schema, result);
        }