public void CheckValidQuotedString_ValidAndInvalidvalues_MatchExpectation() { // No exception expected for the following input. HeaderUtilities.CheckValidQuotedString("\"x\"", "param"); HeaderUtilities.CheckValidQuotedString("\"x y\"", "param"); Assert.Throws <ArgumentException>(() => { HeaderUtilities.CheckValidQuotedString(null, "param"); }); Assert.Throws <ArgumentException>(() => { HeaderUtilities.CheckValidQuotedString("", "param"); }); Assert.Throws <FormatException>(() => { HeaderUtilities.CheckValidQuotedString("\"x", "param"); }); Assert.Throws <FormatException>(() => { HeaderUtilities.CheckValidQuotedString("\"x\"y", "param"); }); }