mirror of
https://gitee.com/fudiwei/DotNetCore.SKIT.FlurlHttpClient.Wechat.git
synced 2025-07-17 19:37:35 +08:00
test(work): 支持相同模型类型、不同示例文件的模型测试
This commit is contained in:
parent
df59eee6b3
commit
77515ee2e9
@ -142,7 +142,7 @@ namespace SKIT.FlurlHttpClient.Wechat
|
|||||||
foreach (string file in lstFile)
|
foreach (string file in lstFile)
|
||||||
{
|
{
|
||||||
string json = File.ReadAllText(file);
|
string json = File.ReadAllText(file);
|
||||||
string name = Path.GetFileNameWithoutExtension(file);
|
string name = Path.GetFileNameWithoutExtension(file).Split('.')[0];
|
||||||
|
|
||||||
Type type = assembly.GetType($"{assembly.GetName().Name}.Models.{name}");
|
Type type = assembly.GetType($"{assembly.GetName().Name}.Models.{name}");
|
||||||
if (type == null)
|
if (type == null)
|
||||||
@ -189,7 +189,7 @@ namespace SKIT.FlurlHttpClient.Wechat
|
|||||||
foreach (string file in lstJsonFile)
|
foreach (string file in lstJsonFile)
|
||||||
{
|
{
|
||||||
string json = File.ReadAllText(file);
|
string json = File.ReadAllText(file);
|
||||||
string name = Path.GetFileNameWithoutExtension(file);
|
string name = Path.GetFileNameWithoutExtension(file).Split('.')[0];
|
||||||
|
|
||||||
Type type = assembly.GetType($"{assembly.GetName().Name}.Events.{name}");
|
Type type = assembly.GetType($"{assembly.GetName().Name}.Events.{name}");
|
||||||
if (type == null)
|
if (type == null)
|
||||||
@ -207,7 +207,7 @@ namespace SKIT.FlurlHttpClient.Wechat
|
|||||||
foreach (string file in lstXmlFile)
|
foreach (string file in lstXmlFile)
|
||||||
{
|
{
|
||||||
string xml = File.ReadAllText(file);
|
string xml = File.ReadAllText(file);
|
||||||
string name = Path.GetFileNameWithoutExtension(file);
|
string name = Path.GetFileNameWithoutExtension(file).Split('.')[0];
|
||||||
|
|
||||||
Type type = assembly.GetType($"{assembly.GetName().Name}.Events.{name}");
|
Type type = assembly.GetType($"{assembly.GetName().Name}.Events.{name}");
|
||||||
if (type == null)
|
if (type == null)
|
||||||
|
Loading…
Reference in New Issue
Block a user