public void DaxFormatterSingleRequest_MaxLineLengthSerialization(DaxFormatterLineStyle lineStyle, int expectedLineStyle)
        {
            var request = new DaxFormatterSingleRequest
            {
                MaxLineLength = lineStyle
            };

            var property         = GetJsonProperty(request, nameof(DaxFormatterSingleRequest.MaxLineLength));
            var currentLineStyle = property.GetInt32();

            Assert.Equal(expectedLineStyle, currentLineStyle);
        }
Ejemplo n.º 2
0
        public async Task DaxFormatterClient_FormatAsync_LineStyleIsHonored(DaxFormatterLineStyle lineStyle, string expression, string expectedExpression)
        {
            var request = new DaxFormatterSingleRequest
            {
                Dax           = expression,
                MaxLineLength = lineStyle
            };

            var response = await _fixture.Client.FormatAsync(request);

            Assert.NotNull(response);

            var actualExpression = response.Formatted;

            Assert.Equal(expectedExpression, actualExpression);
        }