예제 #1
0
        public void When_path_is_slash_then_operation_name_is_index()
        {
            //// Arrange
            var generator = new MultipleClientsFromPathSegmentsOperationNameGenerator();

            //// Act
            var operationName = generator.GetOperationName(new SwaggerDocument(), "/", SwaggerOperationMethod.Get, new SwaggerOperation());

            //// Assert
            Assert.AreEqual("Index", operationName);
        }
예제 #2
0
        public void When_path_with_path_parameter_is_slash_then_operation_name_is_index()
        {
            // Arrange
            var generator = new MultipleClientsFromPathSegmentsOperationNameGenerator();

            // Act
            var operationName = generator.GetOperationName(new OpenApiDocument(), "/{id}", OpenApiOperationMethod.Get, new OpenApiOperation());

            // Assert
            Assert.AreEqual("Index", operationName);
        }