@@ -38,30 +38,19 @@ public void ToPlainText_DogProperties_ShouldReturnDescriptions()
38
38
// Arrange
39
39
var xDoc = new XDoc ( ) ;
40
40
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 ) ) ;
53
44
var idInfo = type . GetProperty ( nameof ( Dog . Id ) ) ;
54
45
55
46
// 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 ) ;
60
50
61
51
// Assert
62
- // Assert.NotEmpty(filed1Comment);
63
- // Assert.NotEmpty(filed2Comment);
64
- // Assert.NotEmpty(nameComment);
52
+ Assert . NotEmpty ( filed2Comment ) ;
53
+ Assert . NotEmpty ( nameComment ) ;
65
54
Assert . NotEmpty ( idComment ) ;
66
55
}
67
56
}
0 commit comments