Extreme Programming in Perl Robert Nagler phần 8

Tham khảo tài liệu 'extreme programming in perl robert nagler phần 8', công nghệ thông tin, kỹ thuật lập trình phục vụ nhu cầu học tập, nghiên cứu và làm việc hiệu quả | calling context and improves testability. The second case tests the server supports CAPA capabilities UIDL unique identifiers and CRAM challenge response authentication . The capability list is unordered so we check the list for UIDL then CRAM or the reverse. Bivio Test allows us to specify a Regexp instance qr as the expected value. The case passes if the expected regular expression matches the actual return which is serialized by Data Dumper. Validate Using Implementation Knowledge foreach my mode qw BEST APOP CRAM-MD5 PASS pop3 Mail POP3Client- new cfg AUTH_MODE mode is_deeply pop3- Body 1 body_lines is pop3- Close 1 pop3 Mail POP3Client- new cfg AUTH_MODE BAD-MODE like pop3- Message qr BAD-MODE is pop3- State AUTHORIZATION is pop3- Close 1 pop3 Mail POP3Client- new cfg AUTH_MODE BEST PASSWORD BAD-PASSWORD like pop3- Message qr PASS failed is pop3- State AUTHORIZATION is pop3- Close 1 pop3 Mail POP3Client- new cfg AUTH_MODE APOP PASSWORD BAD-PASSWORD like pop3- Message qr APOP failed is pop3- Close 1 Once we have validated the server s capabilities we test the authentication interface. Mail POP3Client defaults to AUTH_MODE BEST but we test each mode explictly here. The other cases test the default mode. To be sure authentication was successful we download the body of the first message and compare it with the value we sent. POP3 authentication implies Copyright 2004 Robert Nagler 115 All rights reserved nagler@ authorization to access your messages. We only know we are authorized if we can access the mail user s data. In BEST mode the implementation tries all authentication modes with PASS as the last resort. We use knowledge of the implementation to validate that PASS is the last mode tried. The Message method returns PASS failed which gives the caller information about which AUTH-MODE was used. The test doesn t know the details of the conversation between the server and client so it assumes the implementation doesn t have two defects using .

Không thể tạo bản xem trước, hãy bấm tải xuống
TÀI LIỆU MỚI ĐĂNG
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.