C# 如何在Fitnesse测试中传递空值?

C# 如何在Fitnesse测试中传递空值?,c#,.net,fitnesse,C#,.net,Fitnesse,我正在使用Fit/Fitnesse。我有一个柱状固定装置,看起来像这样 !|Get Stepstools Medication Id From Vocab and String| |Concept As String|Vocabulary Name Abbr|Vocabulary Concept Id|Stepstools Med Id?| |AMOXICILLIN|RXNORM|723|1| |AMOXICILLIN| | |1| |AUGMENTIN|RXNORM|15139

我正在使用Fit/Fitnesse。我有一个柱状固定装置,看起来像这样

!|Get Stepstools Medication Id From Vocab and String| |Concept As String|Vocabulary Name Abbr|Vocabulary Concept Id|Stepstools Med Id?| |AMOXICILLIN|RXNORM|723|1| |AMOXICILLIN| | |1| |AUGMENTIN|RXNORM|151392|8| |AUGMENTIN| | |8| |Amoxicillin 1000 MG / Clavulanate 62.5 MG Extended Release Tablet| | |8|
如何让测试使用空字符串值?

我找到了它。Fitnesse不使用“| |”甚至“| |”,而是希望在使用空字符串时使用关键字“blank”。因此,修改后的测试如下所示:

public class GetStepstoolsMedicationIdFromVocabAndString: ColumnFixture
{
    public string VocabularyNameAbbr;
    public string VocabularyConceptId;
    public string ConceptAsString;

    public string StepStoolsMedId()
    {
        MedicationMapping mapping = MedicationMapper.GetStepMedIdFromVocabNameIdAndStringMed(
            VocabularyNameAbbr, 
            VocabularyConceptId, 
            ConceptAsString
            );

        if (mapping.SuccessfullyMapped)
        {
            return mapping.StepstoolsMedicationId.ToString();
        }
        else 
        {
            return mapping.ErrorMessage;
        }
    }
}
!|从Vocab和String获取StepStool药物Id |
|概念为字符串|词汇名称缩写|词汇概念Id | Stepstools Med Id |
|阿莫西林| RXNORM | 723 | 1 |
|阿莫西林|空白|空白| 1 |
|增强型| RXNORM | 151392 | 8 |
|增强素| blank | blank | 8 |
|阿莫西林1000 MG/克拉维酸盐62.5 MG缓释片|空白|空白| 8 |


另一个有用的关键字是
null
,用于将输入设置为null,而不是将其设置为空字符串,这正是
blank
所做的。