public void MapTo_Given_Null_DynamicContent_Throws_ArgumentNullException() { // Arrange DynamicContent test = null; // Act & Assert Should.Throw <ArgumentNullException>(() => test.MapTo <TestValidClass>()); }
// This overload is used for LINQ expressions when we don't want to include // anything, as you can't have optional params in LINQ expressions. public static T MapTo <T>(this DynamicContent content) where T : new() => content.MapTo <T>(null);