public void CreateTestWithNoteReturnsResponseObject() { var note = _fixture.Create <Note>(); var result = NoteResponseObject.Create(note); result.Should().BeEquivalentTo(note); }
public void CreateTestWithNoteWIthNullAuthorReturnsResponseObject() { var note = _fixture.Create <Note>(); note.Author = null; var result = NoteResponseObject.Create(note); result.Should().BeEquivalentTo(note, (opt) => opt.Excluding(x => x.Author)); result.Author.Should().BeEquivalentTo(new AuthorDetails()); }
public void CreateTestWithNoteWIthNullCategoryReturnsResponseObject() { var note = _fixture.Create <Note>(); note.Categorisation = null; var result = NoteResponseObject.Create(note); result.Should().BeEquivalentTo(note, (opt) => opt.Excluding(x => x.Categorisation)); result.Categorisation.Should().BeEquivalentTo(new Categorisation()); }
public async Task <NoteResponseObject> ExecuteAsync(CreateNoteRequest createNoteRequest) { var result = await _gateway.PostNewNoteAsync(createNoteRequest).ConfigureAwait(false); return(NoteResponseObject.Create(result)); }
public void CreateTestNullNoteThrows() { Action action = () => NoteResponseObject.Create(null); action.Should().Throw <ArgumentNullException>(); }