public async Task Handle_NullCommand_ThrowsArgumentNullException(CreateEndpointHandler subject) { // Arrange // Act Func <Task> act = () => subject.Handle(null, default); // Assert await act.Should().ThrowExactlyAsync <ArgumentNullException>(); }
public async Task Handle_ValidRequest_StoresIntoContext( [Frozen] LandisGyrContext context, CreateEndpoint command, CreateEndpointHandler subject ) { // Arrange // Act var result = await subject.Handle(command, default); // Assert result.Should().NotBeNull(); result.Should().BeEquivalentTo(command); context.Endpoints.Should().Contain(result); }