public void CanGetNotes() { // ARRANGE var expectedNoteDtos = Substitute.For <IList <NoteDto> >(); _noteTaker.ListNotes(Arg.Any <SecurityContext>()).Returns(expectedNoteDtos); // ACT var result = _subjectUnderTest.Get(); // ASSERT Assert.That(result, Is.Not.Null); _noteTaker.Received(1).ListNotes(Arg.Any <SecurityContext>()); }
public IActionResult Get() { var noteDtos = _noteTaker.ListNotes(SecurityContext); return(Ok(noteDtos)); }
public IActionResult Get() { var noteDtos = _noteTaker.ListNotes(); return(Ok(noteDtos)); }