Geary.Imap: Add Quirks object to collect all IMAP service quirk config
This commit is contained in:
parent
865765a24f
commit
ddb3a899fb
12 changed files with 73 additions and 24 deletions
|
|
@ -38,7 +38,7 @@ class Geary.Imap.ClientConnectionTest : TestCase {
|
|||
}
|
||||
|
||||
public void connect_disconnect() throws GLib.Error {
|
||||
var test_article = new ClientConnection(new_endpoint());
|
||||
var test_article = new ClientConnection(new_endpoint(), new Quirks());
|
||||
|
||||
test_article.connect_async.begin(null, this.async_completion);
|
||||
test_article.connect_async.end(async_result());
|
||||
|
|
@ -69,7 +69,7 @@ class Geary.Imap.ClientConnectionTest : TestCase {
|
|||
const int IDLE_TIMEOUT = 1;
|
||||
|
||||
var test_article = new ClientConnection(
|
||||
new_endpoint(), COMMAND_TIMEOUT, IDLE_TIMEOUT
|
||||
new_endpoint(), new Quirks(), COMMAND_TIMEOUT, IDLE_TIMEOUT
|
||||
);
|
||||
test_article.connect_async.begin(null, this.async_completion);
|
||||
test_article.connect_async.end(async_result());
|
||||
|
|
@ -123,7 +123,9 @@ class Geary.Imap.ClientConnectionTest : TestCase {
|
|||
bool recv_fail = false;
|
||||
bool timed_out = false;
|
||||
|
||||
var test_article = new ClientConnection(new_endpoint(), TIMEOUT);
|
||||
var test_article = new ClientConnection(
|
||||
new_endpoint(), new Quirks(), TIMEOUT
|
||||
);
|
||||
test_article.sent_command.connect(() => { sent = true; });
|
||||
test_article.receive_failure.connect(() => { recv_fail = true; });
|
||||
test_article.connect_async.begin(null, this.async_completion);
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ class Geary.Imap.ClientSessionTest : TestCase {
|
|||
);
|
||||
this.server.add_script_line(WAIT_FOR_DISCONNECT, "");
|
||||
|
||||
var test_article = new ClientSession(new_endpoint());
|
||||
var test_article = new ClientSession(new_endpoint(), new Quirks());
|
||||
assert_true(test_article.get_protocol_state() == NOT_CONNECTED);
|
||||
|
||||
test_article.connect_async.begin(
|
||||
|
|
@ -69,7 +69,7 @@ class Geary.Imap.ClientSessionTest : TestCase {
|
|||
);
|
||||
this.server.add_script_line(WAIT_FOR_DISCONNECT, "");
|
||||
|
||||
var test_article = new ClientSession(new_endpoint());
|
||||
var test_article = new ClientSession(new_endpoint(), new Quirks());
|
||||
test_article.connect_async.begin(
|
||||
CONNECT_TIMEOUT, null, this.async_completion
|
||||
);
|
||||
|
|
@ -87,7 +87,7 @@ class Geary.Imap.ClientSessionTest : TestCase {
|
|||
public void connect_timeout() throws GLib.Error {
|
||||
this.server.add_script_line(WAIT_FOR_DISCONNECT, "");
|
||||
|
||||
var test_article = new ClientSession(new_endpoint());
|
||||
var test_article = new ClientSession(new_endpoint(), new Quirks());
|
||||
|
||||
GLib.Timer timer = new GLib.Timer();
|
||||
timer.start();
|
||||
|
|
@ -115,7 +115,7 @@ class Geary.Imap.ClientSessionTest : TestCase {
|
|||
);
|
||||
this.server.add_script_line(WAIT_FOR_DISCONNECT, "");
|
||||
|
||||
var test_article = new ClientSession(new_endpoint());
|
||||
var test_article = new ClientSession(new_endpoint(), new Quirks());
|
||||
test_article.connect_async.begin(
|
||||
CONNECT_TIMEOUT, null, this.async_completion
|
||||
);
|
||||
|
|
@ -147,7 +147,7 @@ class Geary.Imap.ClientSessionTest : TestCase {
|
|||
this.server.add_script_line(SEND_LINE, "a001 OK ohhai");
|
||||
this.server.add_script_line(WAIT_FOR_DISCONNECT, "");
|
||||
|
||||
var test_article = new ClientSession(new_endpoint());
|
||||
var test_article = new ClientSession(new_endpoint(), new Quirks());
|
||||
assert_true(test_article.get_protocol_state() == NOT_CONNECTED);
|
||||
|
||||
test_article.connect_async.begin(
|
||||
|
|
@ -184,7 +184,7 @@ class Geary.Imap.ClientSessionTest : TestCase {
|
|||
this.server.add_script_line(SEND_LINE, "a001 OK laters");
|
||||
this.server.add_script_line(DISCONNECT, "");
|
||||
|
||||
var test_article = new ClientSession(new_endpoint());
|
||||
var test_article = new ClientSession(new_endpoint(), new Quirks());
|
||||
assert_true(test_article.get_protocol_state() == NOT_CONNECTED);
|
||||
|
||||
test_article.connect_async.begin(
|
||||
|
|
@ -215,7 +215,7 @@ class Geary.Imap.ClientSessionTest : TestCase {
|
|||
this.server.add_script_line(SEND_LINE, "a002 OK laters");
|
||||
this.server.add_script_line(DISCONNECT, "");
|
||||
|
||||
var test_article = new ClientSession(new_endpoint());
|
||||
var test_article = new ClientSession(new_endpoint(), new Quirks());
|
||||
assert_true(test_article.get_protocol_state() == NOT_CONNECTED);
|
||||
|
||||
test_article.connect_async.begin(
|
||||
|
|
@ -260,7 +260,7 @@ class Geary.Imap.ClientSessionTest : TestCase {
|
|||
this.server.add_script_line(SEND_LINE, "a004 OK there");
|
||||
this.server.add_script_line(WAIT_FOR_DISCONNECT, "");
|
||||
|
||||
var test_article = new ClientSession(new_endpoint());
|
||||
var test_article = new ClientSession(new_endpoint(), new Quirks());
|
||||
assert_true(test_article.get_protocol_state() == NOT_CONNECTED);
|
||||
|
||||
test_article.connect_async.begin(
|
||||
|
|
@ -304,7 +304,7 @@ class Geary.Imap.ClientSessionTest : TestCase {
|
|||
this.server.add_script_line(SEND_LINE, "a002 OK there");
|
||||
this.server.add_script_line(WAIT_FOR_DISCONNECT, "");
|
||||
|
||||
var test_article = new ClientSession(new_endpoint());
|
||||
var test_article = new ClientSession(new_endpoint(), new Quirks());
|
||||
assert_true(test_article.get_protocol_state() == NOT_CONNECTED);
|
||||
|
||||
test_article.connect_async.begin(
|
||||
|
|
@ -367,7 +367,7 @@ class Geary.Imap.ClientSessionTest : TestCase {
|
|||
this.server.add_script_line(SEND_LINE, "a003 OK there");
|
||||
this.server.add_script_line(WAIT_FOR_DISCONNECT, "");
|
||||
|
||||
var test_article = new ClientSession(new_endpoint());
|
||||
var test_article = new ClientSession(new_endpoint(), new Quirks());
|
||||
assert_true(test_article.get_protocol_state() == NOT_CONNECTED);
|
||||
|
||||
test_article.connect_async.begin(
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ class Geary.Imap.DeserializerTest : TestCase {
|
|||
|
||||
public override void set_up() {
|
||||
this.stream = new MemoryInputStream();
|
||||
this.deser = new Deserializer(ID, this.stream);
|
||||
this.deser = new Deserializer(ID, this.stream, new Quirks());
|
||||
}
|
||||
|
||||
public override void tear_down() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue