diff --git a/README.md b/README.md
index 7f9609b..66d8dee 100644
--- a/README.md
+++ b/README.md
@@ -82,7 +82,7 @@ and even use a parameter from another field not annotated with `AutoConstructorI
### Get-only properties
-Since version 3.0.0, get-only properties (`public int Property { get; }`) are injected by the generator by default.
+Get-only properties (`public int Property { get; }`) are injected by the generator by default.
The behavior of the injection can be modified using [auto-implemented property field-targeted attributes](https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/proposals/csharp-7.3/auto-prop-field-attrs) on its backing field. The following code show an injected get-only property with a custom injecter:
```csharp
@@ -96,11 +96,11 @@ public int Property { get; }
### Generating `ArgumentNullException`
-By default, null checks with `ArgumentNullException` will be generated when needed.
-To disable this behavior, set `AutoConstructor_DisableNullChecking` to `false` in the project file:
+By default, null checks with `ArgumentNullException` are not generated when needed.
+To enable this behavior, set `AutoConstructor_DisableNullChecking` to `false` in the project file:
``` xml
-true
+false
```
### Generating XML documentation comment
diff --git a/src/AutoConstructor.Generator/AutoConstructorGenerator.cs b/src/AutoConstructor.Generator/AutoConstructorGenerator.cs
index 219db23..3ebc581 100644
--- a/src/AutoConstructor.Generator/AutoConstructorGenerator.cs
+++ b/src/AutoConstructor.Generator/AutoConstructorGenerator.cs
@@ -93,7 +93,7 @@ private static void Execute(Compilation compilation, ImmutableArray? diagnostics = null,
- IEnumerable<(string filename, SourceText content)>? configFiles = null)
+ string? configFileContent = null)
{
var test = new CSharpSourceGeneratorVerifier.Test()
{
@@ -55,10 +55,11 @@ public static async Task RunAsync(
test.TestState.ExpectedDiagnostics.AddRange(diagnostics);
}
- if (configFiles is not null)
- {
- test.TestState.AnalyzerConfigFiles.AddRange(configFiles);
- }
+ // Enable null checks for the tests.
+ test.TestState.AnalyzerConfigFiles.Add(("/.editorconfig", SourceText.From($@"
+is_global=true
+build_property.AutoConstructor_DisableNullChecking = false
+{configFileContent}")));
await test.RunAsync();
}