@@ -68,8 +68,8 @@ public async Task GetNoteByIdSuccess()
6868 Assert . That ( noteResult . Status , Is . EqualTo ( "success" ) ) ;
6969 Assert . That ( noteResult . Data , Is . Not . Null ) ;
7070 Assert . That ( noteResult . Data . Id , Is . EqualTo ( noteId ) ) ;
71- Assert . That ( noteResult . Data . Title , Is . EqualTo ( "Name Note 1 " ) ) ;
72- Assert . That ( noteResult . Data . Content , Is . EqualTo ( "note1note1 note1 note1 content " ) ) ;
71+ Assert . That ( noteResult . Data . Title , Is . EqualTo ( "Late " ) ) ;
72+ Assert . That ( noteResult . Data . Content , Is . EqualTo ( "student was late " ) ) ;
7373 }
7474
7575 [ Test ]
@@ -83,47 +83,7 @@ public async Task GetNoteByIdFails()
8383 Assert . That ( response . IsSuccessStatusCode , Is . False ) ;
8484 }
8585
86- [ Test ]
87- public async Task TeacherGetNotesOnAStudentSuccess ( )
88- {
89- await AuthenticateAsTeacherAsync ( ) ;
90-
91- var userId = 1 ; // student user id to get notes for
92- var getNotesResponse = await _client . GetAsync ( $ "/users/{ userId } /notes") ;
93-
94- Assert . That ( getNotesResponse . IsSuccessStatusCode , Is . True ) ;
95-
96- var notesJson = await getNotesResponse . Content . ReadAsStringAsync ( ) ;
97- var notesResult = JsonSerializer . Deserialize < ResponseDTO < NotesResponseDTO > > ( notesJson ,
98- new JsonSerializerOptions { PropertyNameCaseInsensitive = true } ) ;
99-
100- Assert . That ( notesResult , Is . Not . Null ) ;
101- Assert . That ( notesResult . Status , Is . EqualTo ( "success" ) ) ;
102- Assert . That ( notesResult . Data , Is . Not . Null ) ;
103- Assert . That ( notesResult . Data . Notes , Is . Not . Empty ) ;
104- Assert . That ( notesResult . Data . Notes . Count , Is . EqualTo ( 4 ) ) ;
105- }
106-
107- [ Test ]
108- public async Task TeacherGetNotesOnStudentWithNoNotesSuccess ( )
109- {
110- await AuthenticateAsTeacherAsync ( ) ;
111-
112- var userId = 3 ; // student user id to get notes for but user has no notes
113- var getNotesResponse = await _client . GetAsync ( $ "/users/{ userId } /notes") ;
114-
115- Assert . That ( getNotesResponse . IsSuccessStatusCode , Is . True ) ;
116-
117- var notesJson = await getNotesResponse . Content . ReadAsStringAsync ( ) ;
118- var notesResult = JsonSerializer . Deserialize < ResponseDTO < NotesResponseDTO > > ( notesJson ,
119- new JsonSerializerOptions { PropertyNameCaseInsensitive = true } ) ;
120-
121- Assert . That ( notesResult , Is . Not . Null ) ;
122- Assert . That ( notesResult . Status , Is . EqualTo ( "success" ) ) ;
123- Assert . That ( notesResult . Data , Is . Not . Null ) ;
124- Assert . That ( notesResult . Data . Notes , Is . Empty ) ;
125- Assert . That ( notesResult . Data . Notes . Count , Is . EqualTo ( 0 ) ) ;
126- }
86+
12787
12888 private async Task AuthenticateAsTeacherAsync ( )
12989 {
0 commit comments