-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathCreateStudent.expected.txt
More file actions
117 lines (93 loc) · 2.82 KB
/
CreateStudent.expected.txt
File metadata and controls
117 lines (93 loc) · 2.82 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
// <auto-generated/>
// This code was generated by the library M31.FluentAPI.
// Changes to this file may cause incorrect behavior and will be lost if the code is regenerated.
#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member
#nullable enable
using System.Collections.Generic;
namespace M31.FluentApi.Tests.CodeGeneration.TestClasses.Abstract.CustomFluentMethodNameClass;
public class CreateStudent :
CreateStudent.ICreateStudent,
CreateStudent.IWithName,
CreateStudent.IWhoIsHappy,
CreateStudent.IInSemester,
CreateStudent.IWhoseFriendsAre
{
private readonly Student student;
private CreateStudent()
{
student = new Student();
}
public static ICreateStudent InitialStep()
{
return new CreateStudent();
}
public static IWhoIsHappy WithName(string firstName, string lastName)
{
CreateStudent createStudent = new CreateStudent();
createStudent.student.SetNameFromFirstNameAndLastName(firstName, lastName);
return createStudent;
}
IWhoIsHappy IWithName.WithName(string firstName, string lastName)
{
student.SetNameFromFirstNameAndLastName(firstName, lastName);
return this;
}
IInSemester IWhoIsHappy.WhoIsHappy(bool isHappy)
{
student.IsHappy = isHappy;
return this;
}
IInSemester IWhoIsHappy.WhoIsSad()
{
student.IsHappy = false;
return this;
}
IWhoseFriendsAre IInSemester.InSemester(int semester)
{
student.Semester = semester;
return this;
}
Student IWhoseFriendsAre.WhoseFriendsAre(System.Collections.Generic.IReadOnlyCollection<string> friends)
{
student.Friends = friends;
return student;
}
Student IWhoseFriendsAre.WhoseFriendsAre(params string[] friends)
{
student.Friends = friends;
return student;
}
Student IWhoseFriendsAre.WhoseFriendIs(string friend)
{
student.Friends = new string[1]{ friend };
return student;
}
Student IWhoseFriendsAre.WhoHasNoFriends()
{
student.Friends = new string[0];
return student;
}
public interface ICreateStudent : IWithName
{
}
public interface IWithName
{
IWhoIsHappy WithName(string firstName, string lastName);
}
public interface IWhoIsHappy
{
IInSemester WhoIsHappy(bool isHappy = true);
IInSemester WhoIsSad();
}
public interface IInSemester
{
IWhoseFriendsAre InSemester(int semester);
}
public interface IWhoseFriendsAre
{
Student WhoseFriendsAre(System.Collections.Generic.IReadOnlyCollection<string> friends);
Student WhoseFriendsAre(params string[] friends);
Student WhoseFriendIs(string friend);
Student WhoHasNoFriends();
}
}