Remove Geary.RFC822.Part.get_effective_content_type
Just make the `content_type` property non-nullable and set a default in the ctor instead, since it's unlikely to ever be null despite the GMime API suggesting it could be. Update call sites to use the property instead.
This commit is contained in:
parent
88efd14a82
commit
6a871c25c6
6 changed files with 20 additions and 36 deletions
|
|
@ -14,20 +14,16 @@ class Geary.RFC822.PartTest : TestCase {
|
|||
|
||||
public PartTest() {
|
||||
base("Geary.RFC822.PartTest");
|
||||
add_test("new_from_empty_mime_part", new_from_empty_mime_part);
|
||||
add_test("new_from_minimal_mime_part", new_from_minimal_mime_part);
|
||||
add_test("new_from_complete_mime_part", new_from_complete_mime_part);
|
||||
add_test("write_to_buffer_plain", write_to_buffer_plain);
|
||||
add_test("write_to_buffer_plain_crlf", write_to_buffer_plain_crlf);
|
||||
add_test("write_to_buffer_plain_ical", write_to_buffer_plain_ical);
|
||||
}
|
||||
|
||||
public void new_from_empty_mime_part() throws Error {
|
||||
GMime.Part part = new_part(null, CR_BODY.data);
|
||||
part.set_header("Content-Type", "");
|
||||
public void new_from_minimal_mime_part() throws Error {
|
||||
Part test = new Part(new_part("test/plain", CR_BODY.data));
|
||||
|
||||
Part test = new Part(part);
|
||||
|
||||
assert_null(test.content_type, "content_type");
|
||||
assert_null_string(test.content_id, "content_id");
|
||||
assert_null_string(test.content_description, "content_description");
|
||||
assert_null(test.content_disposition, "content_disposition");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue