public void RoundtripRepositorySettingsWithNullBackupSettings() { var settings = new RepositorySettings( directory: Directory.FullName, isTrackingDirty: true, backupSettings: null, extension: ".cde", tempExtension: ".fgh"); var serializer = new DataContractSerializer(settings.GetType()); using Stream stream = PooledMemoryStream.Borrow(); serializer.WriteObject(stream, settings); stream.Position = 0; var roundtripped = (RepositorySettings)serializer.ReadObject(stream); AssertProperties(settings, roundtripped); }