! Copyright (C) 2009 Elie Chaftari. ! See http://factorcode.org/license.txt for BSD license. USING: concurrency.promises namespaces pop3.interactive pop3.server sequences tools.test accessors ; IN: pop3.interactive.tests "p" set [ ] [ "p" get mock-pop3-server ] unit-test [ ] [ "127.0.0.1" >>host "p" get ?promise >>port pop3-connection ] unit-test [ ] [ "username@host.com" >user ] unit-test [ ] [ "password" >pass ] unit-test [ { "CAPA" "TOP" "UIDL" } ] [ capa account capa>> ] unit-test [ ] [ stat ] unit-test [ H{ { 1 "1006" } { 2 "747" } } ] [ list ] unit-test [ ] [ 1 0 top ] unit-test [ { T{ message { # 1 } { uidl "000000d547ac2fc2" } { from "from@mail.com" } { to "username@host.com" } { subject "Testing with mock POP3 server" } { size "1006" } } T{ message { # 2 } { uidl "000000d647ac2fc2" } { from "from@mail.com" } { to "username@host.com" } { subject "Testing with mock POP3 server" } { size "747" } } } ] [ consolidate ] unit-test [ ] [ 1 retr ] unit-test [ f ] [ raw-content empty? ] unit-test [ ] [ 1 dele ] unit-test [ ] [ quit ] unit-test