6
#include <mimetic/mimetic.h>
13
class TEST_CLASS( test_mime )
17
#define SEP "................................................\n"
22
void TEST_FUNCTION( testMimeEntityBuild )
26
mm.header().from("stefano@codesink.org");
27
mm.header().to("you@home.net");
28
mm.header().subject("Hi!");
30
mm.body().assign("Hi!\n\nThank you for trying mimetic!");
31
TEST_ASSERT_EQUALS_P(mm.size(), 96);
32
m_out << std::endl << SEP << mm << std::endl;
34
void TEST_FUNCTION( testMimeBinaryQpAttach )
38
me.body().load("file.bin", qp);
39
TEST_ASSERT_EQUALS_P(me.size(), 50650);
40
m_out << std::endl << SEP << me << std::endl;
42
void TEST_FUNCTION( testMimeBinaryQpBinaryAttach )
46
me.body().load("file.bin", qp);
47
TEST_ASSERT_EQUALS_P(me.size(), 50650);
48
m_out << std::endl << SEP << me << std::endl;
50
void TEST_FUNCTION( testMimeBinaryBase64Attach )
54
me.body().load("file.bin", b64);
55
TEST_ASSERT_EQUALS_P(me.size(), 30631);
56
m_out << std::endl << SEP << me << std::endl;
58
void TEST_FUNCTION( testMimeMessageRfc822 )
61
mm.header().from("stefano@codesink.org");
62
mm.header().to("you@home.net");
63
mm.header().subject("Hi!");
64
mm.body().assign("Hi!\n\nThank you for trying mimetic!");
67
TEST_ASSERT_EQUALS_P(mr.size(), 126);
68
m_out << std::endl << SEP << mr << std::endl;