public void should_ensure_the_name_is_a_valid_identifier() { FeatureFile.Content = "Feature: feature + name"; The.FeatureFrom(FeatureFile, FeatureItem).Name .ShouldBe("Feature_Name"); }
public void should_camel_case_the_name() { FeatureFile.Content = "Feature: feature name"; The.FeatureFrom(FeatureFile, FeatureItem).Name .ShouldBe("FeatureName"); }
public void should_read_the_name_with_single_letter() { FeatureFile.Content = @"Feature: A"; The.FeatureFrom(FeatureFile, FeatureItem).Name .ShouldBe("A"); }
public void should_extract_namespace_and_file_name() { FeatureItem.DefaultNamespace = "MyNamespace"; FeatureFile.Name = "MyFileName"; The.FeatureFrom(FeatureFile, FeatureItem).Namespace .ShouldBe("MyNamespace"); The.FeatureFrom(FeatureFile, FeatureItem).FileName .ShouldBe("MyFileName"); }
public void should_read_the_name() { FeatureFile.Content = Actors.FeatureWithNoScenarios + Environment.NewLine + "whatever"; The.FeatureFrom(FeatureFile, FeatureItem).Name .ShouldBe("FeatureName"); FeatureFile.Content = Actors.FeatureWithNoScenarios; The.FeatureFrom(FeatureFile, FeatureItem).Name .ShouldBe("FeatureName"); }
public void should_handle_an_empty_feature() { FeatureFile.Content = string.Empty; The.FeatureFrom(FeatureFile, FeatureItem).ShouldBeA <InvalidFeature>(); }