Skip to content

Commit e261e2b

Browse files
committed
Update test
1 parent f37cb6c commit e261e2b

File tree

1 file changed

+8
-19
lines changed

1 file changed

+8
-19
lines changed

tests/Render/BitzArt.XDoc.PlainText.Tests/XDocExtensionsTests.cs

Lines changed: 8 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -38,30 +38,19 @@ public void ToPlainText_DogProperties_ShouldReturnDescriptions()
3838
// Arrange
3939
var xDoc = new XDoc();
4040
var type = typeof(Dog);
41-
// var type = typeof(Animal);
42-
43-
// var methodInfo = typeof(IAnimal).GetMethod(nameof(IAnimal.GetProperty1));
44-
// var methodInfo = typeof(Dog).GetMethod(nameof(IAnimal.GetProperty1));
45-
// new Dog().GetInfo()
46-
47-
//type.GetMethod("Get")
48-
var propertyInfos = type.GetProperties();
49-
50-
// var field1Info = type.GetProperty(nameof(Dog.Field1));
51-
// var field2Info = type.GetProperty(nameof(Dog.Field2));
52-
// var nameInfo = type.GetProperty(nameof(Dog.Name));
41+
42+
var field2Info = type.GetProperty(nameof(Dog.Field2));
43+
var nameInfo = type.GetProperty(nameof(Dog.Name));
5344
var idInfo = type.GetProperty(nameof(Dog.Id));
5445

5546
// Act
56-
// var filed1Comment = xDoc.Get(field1Info!).ToPlainText();
57-
// var filed2Comment = xDoc.Get(field2Info!).ToPlainText();
58-
// var nameComment = xDoc.Get(nameInfo!).ToPlainText();
59-
var idComment = xDoc.Get(idInfo!).ToPlainText();
47+
var filed2Comment = xDoc.Get(field2Info!).ToPlainText(forceSingleLine: true);
48+
var nameComment = xDoc.Get(nameInfo!).ToPlainText(forceSingleLine: true);
49+
var idComment = xDoc.Get(idInfo!).ToPlainText(forceSingleLine: true);
6050

6151
// Assert
62-
// Assert.NotEmpty(filed1Comment);
63-
// Assert.NotEmpty(filed2Comment);
64-
// Assert.NotEmpty(nameComment);
52+
Assert.NotEmpty(filed2Comment);
53+
Assert.NotEmpty(nameComment);
6554
Assert.NotEmpty(idComment);
6655
}
6756
}

0 commit comments

Comments
 (0)