uTestEmailAwake.pas
上传用户:yjb1804
上传日期:2021-01-30
资源大小:3105k
文件大小:1k
- unit uTestEmailAwake;
- interface
- uses Classes,uEmailAwake,TestFramework;
- type
- TTestEmailAwake=class(TTestCase)
- published
- procedure TestLoadAwakeCollectionFromXml;
- end;
- implementation
- uses SysUtils;
- { TTestEmailAwake }
- procedure TTestEmailAwake.TestLoadAwakeCollectionFromXml;
- var
- Awake:TEmailAwakeCollection;
- S:String;
- I:Integer;
- begin
- Awake:=TEmailAwakeCollection.Create;
- try
- LoadAwakeCollectionFromXml(Awake);
- for i:=0 to pred(Awake.Count) do
- begin
- with TEmailAwakeItem(Awake.Items[I]).Awake do //需要提醒该邮件了
- begin
- S:='Title: '+TBaseAwake(TEmailAwakeItem(Awake.Items[I]).Awake).Title+#$D#$A;
- S:=S+'AwakeTime:'+DateTimeToStr(TBaseAwake(TEmailAwakeItem(Awake.Items[I]).Awake).AwakeTime)+#$D#$A;
- S:=S+'AwakeDate:'+DateTimeToStr(TBaseAwake(TEmailAwakeItem(Awake.Items[I]).Awake).AwakeDate)+#$D#$A;
- S:=S+'BaseTime:'+DateTimeToStr(TBaseAwake(TEmailAwakeItem(Awake.Items[I]).Awake).BaseTime)+#$D#$A;
- S:=S+'Single:'+BoolToStr(TBaseAwake(TEmailAwakeItem(Awake.Items[I]).Awake).Single)+#$D#$A;
- S:=S+'-----------'+#$D#$A;
- end;
- end;
- Status(S);
- finally
- Awake.Free;
- end;
- end;
- initialization
- TestFrameWork.RegisterTest(TTestEmailAwake.Suite);
- end.