Ejemplo n.º 1
0
    private static string deleteRecord()
    {
        string output = "deleteRecord\n";

        for (int i = 0; i < count; i++)
        {
            LocalParse lp = new LocalParse(sampleArticle.ArticleId, titles[i], "n", sampleArticle.ArticleId + 1);
            if (!LocalParseManager.deleteRecord(lp))
            {
                output += "Error! 删除WordContent为\"" + titles[i] + "\"的LocalParse记录失败!\n";
                errorCount++;
            }
            else
            {
                output += "Ok! 删除WordContent为\"" + titles[i] + "\"的LocalParse记录成功!\n";
            }
        }

        // delete Global Parse
        for (int i = 0; i < count; i++)
        {
            GlobalParse gp = new GlobalParse();
            gp.WordContent = titles[i];
            if (!GlobalParseManager.deleteRecord(gp))
            {
                output += "Error! 删除WordContent为\"" + titles[i] + "\"的GlobalParse记录失败!测试无法继续进行。请先解决GlobalParseManager中的错误。\n";
                errorCount++;
            }
        }

        return(output);
    }
Ejemplo n.º 2
0
    private static string deleteRecord()
    {
        string output = "deleteRecord\n";

        for (int i = 0; i < count; i++)
        {
            GlobalParse gp = new GlobalParse();
            gp.WordContent = titles[i];
            if (!GlobalParseManager.deleteRecord(gp))
            {
                output += "Error! 删除WordContent为\"" + titles[i] + "\"的GlobalParse记录失败!\n";
                errorCount++;
            }
            else
            {
                output += "Ok! 删除WordContent为\"" + titles[i] + "\"的GlobalParse记录成功!\n";
            }
        }

        return(output);
    }