当用例类只有一个依赖项并且它的执行只调用该依赖项的方法时,是否值得创建一个用例类?
public class GetOrdersUseCase {
private OrdersManager ordersManager;
public GetOrderUseCase(OrdersManager ordersManager) {
this.ordersManager = ordersManager;
}
public List<Order> execute() {
ordersManager.getOrders();
}
}