Example #1
0
        public void Given_OpenApiPropertyDescriptionAttribute_When_Visit_Invoked_Then_It_Should_Return_Result(string name, string description)
        {
            var acceptor  = new OpenApiSchemaAcceptor();
            var type      = new KeyValuePair <string, Type>(name, typeof(Guid));
            var attribute = new OpenApiPropertyDescriptionAttribute(description);

            this._visitor.Visit(acceptor, type, this._strategy, attribute);

            acceptor.Schemas[name].Description.Should().Be(description);
        }
Example #2
0
        public void Given_Value_Property_Should_Return_Value(string description)
        {
            var attribute = new OpenApiPropertyDescriptionAttribute(description);

            attribute.Description.Should().Be(description);
        }