Ejemplo n.º 1
0
        public void When_run_on_an_assembly()
        {
            var stage = new ServiceMetadataStage(typeof(ServiceMetadataStage).Assembly);

            stage.OnStart(_stageArgs);

            Metadata.ShouldSatisfyAllConditions(
                () => Metadata.Name.ShouldBe("KickOff"),
                () => Metadata.Description.ShouldBe("Microservice bootstrapping pipeline")
                );
        }
Ejemplo n.º 2
0
        public void When_there_is_no_name_attribute()
        {
            var stage = new ServiceMetadataStage(new Attribute[]
            {
                new AssemblyDescriptionAttribute("desc"),
            });

            stage.OnStart(_stageArgs);

            Metadata.Description.ShouldBe("desc");
        }
Ejemplo n.º 3
0
        public void When_there_is_no_description_attribute()
        {
            var stage = new ServiceMetadataStage(new Attribute[]
            {
                new AssemblyTitleAttribute("title"),
            });

            stage.OnStart(_stageArgs);

            Metadata.Name.ShouldBe("title");
        }
Ejemplo n.º 4
0
        public void When_there_are_no_attributes()
        {
            var stage = new ServiceMetadataStage(new Attribute[] { });

            stage.OnStart(_stageArgs);

            Metadata.ShouldSatisfyAllConditions(
                () => Metadata.Name.ShouldBe(string.Empty),
                () => Metadata.Description.ShouldBe(string.Empty)
                );
        }
Ejemplo n.º 5
0
        public void When_there_are_both_attributes()
        {
            var stage = new ServiceMetadataStage(new Attribute[]
            {
                new AssemblyTitleAttribute("title"),
                new AssemblyDescriptionAttribute("desc"),
            });

            stage.OnStart(_stageArgs);

            Metadata.ShouldSatisfyAllConditions(
                () => Metadata.Name.ShouldBe("title"),
                () => Metadata.Description.ShouldBe("desc")
                );
        }