How to pass empty value in Fitnesse test?

I use Fit / Fitnesse. I have a column that looks like this.

  ! | 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 |

I am trying to pass empty string values โ€‹โ€‹using | | | | but when starting the test it takes the value from the previous line and uses this instead.

My device code is as follows:

 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; } } } 

How do I get a test for using empty string values?

+6
c # fitnesse
source share
1 answer

I found him. Instead of using only "||" or even "| |", Fitnesse expects the keyword "blank" if an empty string is the goal. Therefore, the revised test is as follows:

! | Get Stepstools Drug Identifier from Vocab and String | | Concept as a string | Dictionary Name Abbr | Dictionary Concept Id | Stepstools Med Id? | | AMOXICILLIN | RXNORM | 723 | 1 |
| AMOXICILLIN | empty | empty | 1 |
| Augmentins | RXNORM | 151392 | 8 |
| Augmentin | empty | empty | 8 |
| Amoxicillin 1000 MG / Clavulanate 62.5 MG Extended Release Tablet | blank | blank | 8 |

+5
source share

All Articles