Esempio n. 1
0
        public void GenerateResultBuilder()
        {
            _generator.Generate(
                _codeWriter,
                IntegrationDescriptors.CreateGetHeroResultBuilderDescriptor(),
                out _);

            _stringBuilder.ToString().MatchSnapshot();
        }
Esempio n. 2
0
        public void GenerateResultBuilder_OneNullableEntityProperty()
        {
            _generator.Generate(
                _codeWriter,
                GetResultBuilderDescriptor(
                    new[]
            {
                new PropertyDescriptor(
                    "TheBar",
                    new NamedTypeDescriptor(
                        "Bar",
                        "BarNamespace",
                        false,
                        kind: TypeKind.EntityType,
                        graphQLTypeName: "BarType",
                        properties: new[] { GetNamedNullableStringTypeReference("name") }))
            }),
                out _);

            _stringBuilder.ToString().MatchSnapshot();
        }