Exemplo n.º 1
0
            public void should_ensure_the_name_is_a_valid_identifier()
            {
                FeatureFile.Content = "Feature: feature + name";

                The.FeatureFrom(FeatureFile, FeatureItem).Name
                .ShouldBe("Feature_Name");
            }
Exemplo n.º 2
0
            public void should_camel_case_the_name()
            {
                FeatureFile.Content = "Feature: feature name";

                The.FeatureFrom(FeatureFile, FeatureItem).Name
                .ShouldBe("FeatureName");
            }
Exemplo n.º 3
0
            public void should_read_the_name_with_single_letter()
            {
                FeatureFile.Content = @"Feature: A";

                The.FeatureFrom(FeatureFile, FeatureItem).Name
                .ShouldBe("A");
            }
Exemplo n.º 4
0
            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");
            }
Exemplo n.º 5
0
            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");
            }
Exemplo n.º 6
0
 public void should_handle_an_empty_feature()
 {
     FeatureFile.Content = string.Empty;
     The.FeatureFrom(FeatureFile, FeatureItem).ShouldBeA <InvalidFeature>();
 }