Added plugin for Sections Changesets in Android
Summary: just the skeleton for the android plugin Reviewed By: passy Differential Revision: D16006791 fbshipit-source-id: b0fe2143afeab6bc0671b7ad5a3ccfbccdd6e40a
This commit is contained in:
committed by
Facebook Github Bot
parent
33df17b462
commit
3ba71cea9c
@@ -0,0 +1,33 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||||
|
*
|
||||||
|
* This source code is licensed under the MIT license found in the LICENSE
|
||||||
|
* file in the root directory of this source tree.
|
||||||
|
*/
|
||||||
|
package com.facebook.flipper.plugins.sections;
|
||||||
|
|
||||||
|
import com.facebook.flipper.core.FlipperConnection;
|
||||||
|
import com.facebook.flipper.core.FlipperPlugin;
|
||||||
|
|
||||||
|
public class SectionsFlipperPlugin implements FlipperPlugin {
|
||||||
|
|
||||||
|
private FlipperConnection mConnection;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getId() {
|
||||||
|
return "Sections";
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onConnect(FlipperConnection connection) throws Exception {
|
||||||
|
mConnection = connection;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onDisconnect() throws Exception {}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean runInBackground() {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,26 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (c) 2018-present, Facebook, Inc.
|
||||||
|
*
|
||||||
|
* This source code is licensed under the MIT license found in the LICENSE
|
||||||
|
* file in the root directory of this source tree.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
package com.facebook.flipper.plugins.sections;
|
||||||
|
|
||||||
|
import com.facebook.flipper.testing.FlipperConnectionMock;
|
||||||
|
import com.facebook.flipper.testing.FlipperResponderMock;
|
||||||
|
import org.junit.Test;
|
||||||
|
import org.junit.runner.RunWith;
|
||||||
|
import org.robolectric.RobolectricTestRunner;
|
||||||
|
|
||||||
|
@RunWith(RobolectricTestRunner.class)
|
||||||
|
public class SectionsFlipperPluginTest {
|
||||||
|
@Test
|
||||||
|
public void greetingTest() throws Exception {
|
||||||
|
final SectionsFlipperPlugin plugin = new SectionsFlipperPlugin();
|
||||||
|
final FlipperConnectionMock connection = new FlipperConnectionMock();
|
||||||
|
final FlipperResponderMock responder = new FlipperResponderMock();
|
||||||
|
|
||||||
|
plugin.onConnect(connection);
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user