forked from dotnet/command-line-api
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add
Add()
method to ContainerSpan class (dotnet#904)
- Loading branch information
1 parent
750fdd1
commit d252893
Showing
2 changed files
with
33 additions
and
0 deletions.
There are no files selected for viewing
21 changes: 21 additions & 0 deletions
21
src/System.CommandLine.Rendering.Tests/ContainerSpanTests.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
// Copyright (c) .NET Foundation and contributors. All rights reserved. | ||
// Licensed under the MIT license. See LICENSE file in the project root for full license information. | ||
|
||
using System.IO; | ||
using FluentAssertions; | ||
using Xunit; | ||
|
||
namespace System.CommandLine.Rendering.Tests | ||
{ | ||
public class ContainerSpanTests | ||
{ | ||
[Fact] | ||
public void Container_span_supports_add_method() | ||
{ | ||
var span = new ContainerSpan(new ContentSpan("content")); | ||
span.Add(new ContentSpan(" with child")); | ||
|
||
span.ContentLength.Should().Be("content with child".Length); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters