Skip to content

Commit 1966721

Browse files
committed
fix: WronglyCommentedClass and WronglyCommentedClass2 tests
1 parent 471d98c commit 1966721

File tree

5 files changed

+104
-30
lines changed

5 files changed

+104
-30
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
// <auto-generated/>
2+
// This code was generated by the library M31.FluentAPI.
3+
// Changes to this file may cause incorrect behavior and will be lost if the code is regenerated.
4+
5+
#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member
6+
#nullable enable
7+
8+
namespace M31.FluentApi.Tests.CodeGeneration.TestClasses.Abstract.FluentApiComments.WronglyCommentedClass;
9+
10+
public class CreateStudent :
11+
CreateStudent.ICreateStudent,
12+
CreateStudent.IWithName
13+
{
14+
private readonly Student student;
15+
16+
private CreateStudent()
17+
{
18+
student = new Student();
19+
}
20+
21+
public static ICreateStudent InitialStep()
22+
{
23+
return new CreateStudent();
24+
}
25+
26+
public static Student WithName(string name)
27+
{
28+
CreateStudent createStudent = new CreateStudent();
29+
createStudent.student.Name = name;
30+
return createStudent.student;
31+
}
32+
33+
Student IWithName.WithName(string name)
34+
{
35+
student.Name = name;
36+
return student;
37+
}
38+
39+
public interface ICreateStudent : IWithName
40+
{
41+
}
42+
43+
public interface IWithName
44+
{
45+
Student WithName(string name);
46+
}
47+
}

src/M31.FluentApi.Tests/CodeGeneration/TestClasses/Abstract/FluentApiComments/WronglyCommentedClass/Student.cs

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -11,19 +11,9 @@ namespace M31.FluentApi.Tests.CodeGeneration.TestClasses.Abstract.FluentApiComme
1111
public class Student
1212
{
1313
// <fluentSummary>
14-
// Sets the student's city.
14+
// Sets the student's name.
1515
// </fluentSummary>
16-
// <fluentParam name="city">The student's city.</fluentParam>
17-
//
18-
// <fluentSummary>
19-
// Set's the student's city to Boston.
20-
// </fluentSummary>
21-
//
22-
// <fluentSummary>
23-
// Set's the student's city to null.
24-
// </fluentSummary>
25-
[FluentMember(0, "LivingIn")]
26-
[FluentDefault("LivingInBoston")]
27-
[FluentNullable("InUnknownCity")]
28-
public string? City { get; set; } = "Boston";
16+
// <fluentParam name="name">The student's name.</fluentParam>
17+
[FluentMember(0)]
18+
public string Name { get; set; }
2919
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
// <auto-generated/>
2+
// This code was generated by the library M31.FluentAPI.
3+
// Changes to this file may cause incorrect behavior and will be lost if the code is regenerated.
4+
5+
#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member
6+
#nullable enable
7+
8+
namespace M31.FluentApi.Tests.CodeGeneration.TestClasses.Abstract.FluentApiComments.WronglyCommentedClass2;
9+
10+
public class CreateStudent :
11+
CreateStudent.ICreateStudent,
12+
CreateStudent.IWithName
13+
{
14+
private readonly Student student;
15+
16+
private CreateStudent()
17+
{
18+
student = new Student();
19+
}
20+
21+
public static ICreateStudent InitialStep()
22+
{
23+
return new CreateStudent();
24+
}
25+
26+
public static Student WithName(string name)
27+
{
28+
CreateStudent createStudent = new CreateStudent();
29+
createStudent.student.Name = name;
30+
return createStudent.student;
31+
}
32+
33+
Student IWithName.WithName(string name)
34+
{
35+
student.Name = name;
36+
return student;
37+
}
38+
39+
public interface ICreateStudent : IWithName
40+
{
41+
}
42+
43+
public interface IWithName
44+
{
45+
Student WithName(string name);
46+
}
47+
}

src/M31.FluentApi.Tests/CodeGeneration/TestClasses/Abstract/FluentApiComments/WronglyCommentedClass2/Student.cs

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -11,19 +11,9 @@ namespace M31.FluentApi.Tests.CodeGeneration.TestClasses.Abstract.FluentApiComme
1111
public class Student
1212
{
1313
///// <fluentSummary>
14-
///// Sets the student's city.
14+
///// Sets the student's name.
1515
///// </fluentSummary>
16-
///// <fluentParam name="city">The student's city.</fluentParam>
17-
/////
18-
///// <fluentSummary>
19-
///// Set's the student's city to Boston.
20-
///// </fluentSummary>
21-
/////
22-
///// <fluentSummary>
23-
///// Set's the student's city to null.
24-
///// </fluentSummary>
25-
[FluentMember(0, "LivingIn")]
26-
[FluentDefault("LivingInBoston")]
27-
[FluentNullable("InUnknownCity")]
28-
public string? City { get; set; } = "Boston";
16+
///// <fluentParam name="name">The student's name.</fluentParam>
17+
[FluentMember(0)]
18+
public string Name { get; set; }
2919
}

src/M31.FluentApi.Tests/CodeGeneration/TestDataProvider.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ internal class TestDataProvider : IEnumerable<object[]>
2828
new object[] { "Abstract", "FluentApiComments", "CommentedPropertiesClassAdvanced", "Student" },
2929
new object[] { "Abstract", "FluentApiComments", "IncompletelyCommentedPropertyClass", "Student"},
3030
new object[] { "Abstract", "FluentApiComments", "RedundantCommentCompoundClass", "Student" },
31-
new object[] { "Abstract", "FluentApiComments", "WronglyCommentCompoundClass", "Student" },
32-
new object[] { "Abstract", "FluentApiComments", "WronglyCommentCompoundClass2", "Student" },
31+
new object[] { "Abstract", "FluentApiComments", "WronglyCommentedClass", "Student" },
32+
new object[] { "Abstract", "FluentApiComments", "WronglyCommentedClass2", "Student" },
3333
new object[] { "Abstract", "EmptyClass", "Student" },
3434
new object[] { "Abstract", "FluentDefaultMemberClass", "Student" },
3535
new object[] { "Abstract", "FluentLambdaClass", "Student|Address" },

0 commit comments

Comments
 (0)