public void Shall_clone_header() { AcceptEncodingHeader original = AcceptEncodingHeader.Parse("gzip"); AcceptEncodingHeader cloned = original.DeepClone(); original.Element = "deflate"; original.Parameters.Add(new GenericParameter("foo", "bar")); Assert.That(cloned.ToString(), Is.EqualTo("gzip")); Assert.That(original.ToString(), Is.EqualTo("deflate;foo=bar")); }
public void Shall_stringify_header() { var header = new AcceptEncodingHeader { Element = "gzip", Parameters = { new GenericParameter("foo", "bar") } }; Assert.That(header.ToString(), Is.EqualTo("gzip;foo=bar")); }