* limitations under the License.
* ============LICENSE_END=========================================================
*/
-package org.onap.dmaap.dbcapi.model;
+package org.onap.dmaap.dbcapi.testframework;
+
+import org.onap.dmaap.dbcapi.model.DR_Node;
+import org.onap.dmaap.dbcapi.model.DR_Sub;
+import org.onap.dmaap.dbcapi.model.DcaeLocation;
+import org.onap.dmaap.dbcapi.model.Dmaap;
+import org.onap.dmaap.dbcapi.model.FqtnType;
+import org.onap.dmaap.dbcapi.model.MR_Client;
+import org.onap.dmaap.dbcapi.model.MR_Cluster;
+import org.onap.dmaap.dbcapi.model.Topic;
+import org.onap.dmaap.dbcapi.util.RandomInteger;
import static org.junit.Assert.*;
Topic t = new Topic();
t.setTopicName( tname );
t.setFqtnStyle( FqtnType.Validator("none") );
- t.getFqtn();
+ t.setTopicDescription( "a simple Topic named " + tname );
+ t.setOwner( "ut");
return t;
}
}
return new DR_Sub( central_loc, un, up, feed, du, lu, u100 );
}
+
+ public DR_Node genDR_Node( String l ) {
+ String version = "1.0.1";
+ RandomInteger ri = new RandomInteger( 1000 );
+ int i = ri.next();
+ String fqdn = String.format( "drns%d.onap.org", i );
+ String host = String.format( "host%d.onap.org", i );
+
+ if ( l.contains( "edge" ) ) {
+ return new DR_Node( fqdn, edge_loc, host, version );
+ }
+ return new DR_Node( fqdn, central_loc, host, version );
+ }
}