public async Task Abort_SetsStateToStopped() { var serviceBusBuilder = new ServiceBusBuilder(Substitute.For <ISimulation>()); var serviceBusSimulator = new ServiceBusSimulator(serviceBusBuilder); await serviceBusSimulator.StartAsync(); try { serviceBusSimulator.Abort(); serviceBusSimulator.State.ShouldBe(SimulatorState.Stopped); } finally { await serviceBusSimulator.StopAsync(); } }