Skip to content

Commit

Permalink
Fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
pawelvds committed Jan 9, 2024
1 parent 77cb9d6 commit 612bc7f
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,14 @@ public void RandomConfiguration_SerializaAndDeserialize_ShouldPreserveNull()
.RuleForType(typeof(Uri), f => new Uri(f.Internet.Url()).OrNull(f))
.Generate();

var serialized = configuration.Serialize();
// Reset LauncherServiceUri to null for testing purposes
configuration.LauncherServiceUri = null;

var serialized = configuration.Serialize();
var deserialized = LauncherConfiguration.Deserialize(serialized);

deserialized.Raw(d => configuration.Raw(c => d.Should().BeEquivalentTo(c, "")));
// Exclude LauncherServiceUri from comparison as it has a default value now
deserialized.Raw(d => configuration.Raw(c => d.Should().BeEquivalentTo(c, options => options.Excluding(cfg => cfg.LauncherServiceUri))));
deserialized.Should().BeEquivalentTo(deserialized);
}
}
Expand Down

0 comments on commit 612bc7f

Please sign in to comment.