Flutter Engine
flutter::testing::ScopedStubFlutterApi Class Reference

#include <stub_flutter_api.h>

Public Member Functions

 ScopedStubFlutterApi (std::unique_ptr< StubFlutterApi > stub)
 
 ~ScopedStubFlutterApi ()
 
StubFlutterApistub ()
 

Detailed Description

Definition at line 71 of file stub_flutter_api.h.

Constructor & Destructor Documentation

◆ ScopedStubFlutterApi()

flutter::testing::ScopedStubFlutterApi::ScopedStubFlutterApi ( std::unique_ptr< StubFlutterApi stub)

Definition at line 22 of file stub_flutter_api.cc.

References flutter::testing::StubFlutterApi::GetTestStub(), and flutter::testing::StubFlutterApi::SetTestStub().

23  : stub_(std::move(stub)) {
24  previous_stub_ = StubFlutterApi::GetTestStub();
25  StubFlutterApi::SetTestStub(stub_.get());
26 }
static StubFlutterApi * GetTestStub()
static void SetTestStub(StubFlutterApi *stub)

◆ ~ScopedStubFlutterApi()

flutter::testing::ScopedStubFlutterApi::~ScopedStubFlutterApi ( )

Definition at line 28 of file stub_flutter_api.cc.

References flutter::testing::StubFlutterApi::SetTestStub().

28  {
29  StubFlutterApi::SetTestStub(previous_stub_);
30 }
static void SetTestStub(StubFlutterApi *stub)

Member Function Documentation

◆ stub()

StubFlutterApi* flutter::testing::ScopedStubFlutterApi::stub ( )
inline

Definition at line 79 of file stub_flutter_api.h.

Referenced by flutter::TEST().

79 { return stub_.get(); }

The documentation for this class was generated from the following files: