mirror of
https://github.com/alibaba/testable-mock.git
synced 2025-03-30 22:20:34 +08:00
fix typo and format code
This commit is contained in:
parent
682d822249
commit
aee2ec2767
@ -11,7 +11,7 @@ import com.alibaba.demo.basic.model.mock.Color;
|
|||||||
public class DemoInherit {
|
public class DemoInherit {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* call method overridden by sub class via parent class variable
|
* call method overridden by subclass via parent class variable
|
||||||
*/
|
*/
|
||||||
public Box putIntoBox() {
|
public Box putIntoBox() {
|
||||||
Box box = new BlackBox("");
|
Box box = new BlackBox("");
|
||||||
@ -20,7 +20,7 @@ public class DemoInherit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* call method overridden by sub class via sub class variable
|
* call method overridden by subclass via subclass variable
|
||||||
*/
|
*/
|
||||||
public BlackBox putIntoBlackBox() {
|
public BlackBox putIntoBlackBox() {
|
||||||
BlackBox box = new BlackBox("");
|
BlackBox box = new BlackBox("");
|
||||||
@ -37,7 +37,7 @@ public class DemoInherit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* call method defined in parent class via sub class variable
|
* call method defined in parent class via subclass variable
|
||||||
*/
|
*/
|
||||||
public String getFromBlackBox() {
|
public String getFromBlackBox() {
|
||||||
BlackBox box = new BlackBox("data");
|
BlackBox box = new BlackBox("data");
|
||||||
@ -53,7 +53,7 @@ public class DemoInherit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* call method defined in interface via sub class variable
|
* call method defined in interface via subclass variable
|
||||||
*/
|
*/
|
||||||
public String getColorViaBox() {
|
public String getColorViaBox() {
|
||||||
BlackBox box = new BlackBox("");
|
BlackBox box = new BlackBox("");
|
||||||
@ -61,7 +61,7 @@ public class DemoInherit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* call method defined in interface via sub class variable
|
* call method defined in interface via subclass variable
|
||||||
*/
|
*/
|
||||||
public String getColorIdxViaColor() {
|
public String getColorIdxViaColor() {
|
||||||
Color color = new BlackBox("");
|
Color color = new BlackBox("");
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
package com.alibaba.demo.basic.model.mock;
|
package com.alibaba.demo.basic.model.mock;
|
||||||
|
|
||||||
public interface Color extends BasicColor{
|
public interface Color extends BasicColor {
|
||||||
|
|
||||||
String getColor();
|
String getColor();
|
||||||
|
|
||||||
|
@ -11,7 +11,7 @@ import com.alibaba.demo.basic.model.mock.Color
|
|||||||
class DemoInherit {
|
class DemoInherit {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* call method overridden by sub class via parent class variable
|
* call method overridden by subclass via parent class variable
|
||||||
*/
|
*/
|
||||||
fun putIntoBox(): Box {
|
fun putIntoBox(): Box {
|
||||||
val box: Box = BlackBox("")
|
val box: Box = BlackBox("")
|
||||||
@ -20,7 +20,7 @@ class DemoInherit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* call method overridden by sub class via sub class variable
|
* call method overridden by subclass via subclass variable
|
||||||
*/
|
*/
|
||||||
fun putIntoBlackBox(): BlackBox {
|
fun putIntoBlackBox(): BlackBox {
|
||||||
val box = BlackBox("")
|
val box = BlackBox("")
|
||||||
@ -38,7 +38,7 @@ class DemoInherit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* call method defined in parent class via sub class variable
|
* call method defined in parent class via subclass variable
|
||||||
*/
|
*/
|
||||||
val fromBlackBox: String?
|
val fromBlackBox: String?
|
||||||
get() {
|
get() {
|
||||||
@ -56,7 +56,7 @@ class DemoInherit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* call method defined in interface via sub class variable
|
* call method defined in interface via subclass variable
|
||||||
*/
|
*/
|
||||||
val colorViaBox: String
|
val colorViaBox: String
|
||||||
get() {
|
get() {
|
||||||
|
Loading…
Reference in New Issue
Block a user