public async Task NullableWithValue_Enabled()
        {
            tester.AddQuery("./Files/NullableReferenceTypes/NullableWithValue.gql");
            tester.Configure(s =>
            {
                s.TemplateSettings["Nullable"] = "enabled";
            });

            var code = await tester.Generate();

            await tester.Verify();

            Assert.Contains("public Test.DroidResult? Test { get; set; }", code);
            Assert.Contains("Task<Test.NullableWithValueQResult> NullableWithValueQAsync(string? temp);", code);
        }
예제 #2
0
        public async Task SettingExplicitlyTrue()
        {
            tester.AddQuery("./Files/StringifiedEnums/Query.gql");
            tester.Configure(s =>
            {
                s.TemplateSettings["StringifyEnums"] = "true";
            });

            var code = await tester.Generate();

            Assert.Contains(@"[JsonConverter(typeof(Episode.CustomJsonStringifiedEnumConverter))]", code);
            Assert.Contains(@"public class Episode", code);

            await tester.Verify();
        }