ContentTypeIsJson() public method

public ContentTypeIsJson ( ) : bool
return bool
		public void Should_not_be_json_when_content_type_header_is_absent()
		{
			var headers = new Dictionary<string, string>();
			var response = new Response(HttpStatusCode.OK, headers, string.Empty);

			Assert.That(response.ContentTypeIsJson(), Is.False);
		}
		public void Should_be_json_when_content_type_header_is_json_with_charset()
		{
			var headers = new Dictionary<string, string>
				{
					{"Content-Type", "application/json; charset=UTF-8"}
				};
			var response = new Response(HttpStatusCode.OK, headers, string.Empty);

			Assert.That(response.ContentTypeIsJson(), Is.True);
		}
		public void Should_be_json_when_content_type_header_is_text_json()
		{
			var headers = new Dictionary<string, string>
				{
					{"Content-Type", "text/json"}
				};
			var response = new Response(HttpStatusCode.OK, headers, string.Empty);

			Assert.That(response.ContentTypeIsJson(), Is.True);
		}