Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
TWebModule に基づいて、Delphi で ISAPI プロジェクトを作成しました。
Delphi TestFramework を使用して、処理されるアクションを単体テストしたいと考えています。
入力は TWebRequest と TWebResponse です。私の質問は、どのように TWebRequest を作成し、コンテンツとクエリ フィールドを定義するのですか? これらは読み取り専用のようです。Web 要求を作成するには、モック サーバー プロトコルを作成する必要がありますか?
拡張 RTTI (Delphi 2010 以降で使用可能) を使用すると、プライベート フィールドに隠されている場合でも、オブジェクトの状態を変更できるはずです。(おそらく多くの作業が必要ですが、一度だけ実行する必要があり、すべてのテストで再利用できます。)