Initial unit testing commit - Renderer
[transportpce.git] / renderer / src / test / java / org / opendaylight / transportpce / renderer / stub / OlmServiceStub.java
diff --git a/renderer/src/test/java/org/opendaylight/transportpce/renderer/stub/OlmServiceStub.java b/renderer/src/test/java/org/opendaylight/transportpce/renderer/stub/OlmServiceStub.java
new file mode 100644 (file)
index 0000000..cd55992
--- /dev/null
@@ -0,0 +1,61 @@
+/*
+ * Copyright © 2018 Orange Systems, Inc. and others.  All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ */
+package org.opendaylight.transportpce.renderer.stub;
+
+import java.util.ArrayList;
+import java.util.concurrent.Future;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.olm.rev170418.CalculateSpanlossBaseInput;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.olm.rev170418.CalculateSpanlossBaseOutput;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.olm.rev170418.CalculateSpanlossCurrentInput;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.olm.rev170418.CalculateSpanlossCurrentOutput;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.olm.rev170418.GetPmInput;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.olm.rev170418.GetPmOutput;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.olm.rev170418.GetPmOutputBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.olm.rev170418.OlmService;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.olm.rev170418.ServicePowerResetInput;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.olm.rev170418.ServicePowerResetOutput;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.olm.rev170418.ServicePowerSetupInput;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.olm.rev170418.ServicePowerSetupOutput;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.olm.rev170418.ServicePowerSetupOutputBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.olm.rev170418.ServicePowerTurndownInput;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.olm.rev170418.ServicePowerTurndownOutput;
+import org.opendaylight.yangtools.yang.common.RpcResult;
+import org.opendaylight.yangtools.yang.common.RpcResultBuilder;
+
+public class OlmServiceStub implements OlmService {
+
+    @Override public Future<RpcResult<CalculateSpanlossCurrentOutput>> calculateSpanlossCurrent(
+        CalculateSpanlossCurrentInput input) {
+        return null;
+    }
+
+    @Override public Future<RpcResult<GetPmOutput>> getPm(GetPmInput input) {
+        GetPmOutput output = new GetPmOutputBuilder()
+            .setNodeId("node1").setMeasurements(new ArrayList<>()).build();
+        return RpcResultBuilder.success(
+            output).buildFuture();
+    }
+
+    @Override public Future<RpcResult<ServicePowerTurndownOutput>> servicePowerTurndown(
+        ServicePowerTurndownInput input) {
+        return null;
+    }
+
+    @Override public Future<RpcResult<CalculateSpanlossBaseOutput>> calculateSpanlossBase(
+        CalculateSpanlossBaseInput input) {
+        return null;
+    }
+
+    @Override public Future<RpcResult<ServicePowerResetOutput>> servicePowerReset(ServicePowerResetInput input) {
+        return null;
+    }
+
+    @Override public Future<RpcResult<ServicePowerSetupOutput>> servicePowerSetup(ServicePowerSetupInput input) {
+        return RpcResultBuilder.success(new ServicePowerSetupOutputBuilder().build()).buildFuture();
+    }
+}