pl.mbdev.openstage.test
Class OpenStageSDK_Test

java.lang.Object
  extended by pl.mbdev.openstage.test.OpenStageSDK_Test
Direct Known Subclasses:
AllConstructors, HttpConnectionTest, PushTest, WrappingTest

public abstract class OpenStageSDK_Test
extends java.lang.Object

This class is used to test behaviour of various methods from SDK. It sends character streams to console instead of network, therefore it is very easy to debug the SDK.

Subclasses should define the main() method, and only invoke own constructor there. This will start SDK test, which should be defined in the writeXml(PrintWriter) method of a subclass. Test is meant to be generating sample XML output via Xml.sendTo(PrintWriter out) method. This output is then redirected by this class to System.out, and all exceptions are also printed out to console.

 Copyright 2011 Mateusz Bysiek,
     mb@mbdev.pl, http://mbdev.pl/
 
 Licensed under the Apache License, Version 2.0 (the "License");
 you may not use this file except in compliance with the License.
 You may obtain a copy of the License at
 
     http://www.apache.org/licenses/LICENSE-2.0
 
 Unless required by applicable law or agreed to in writing, software
 distributed under the License is distributed on an "AS IS" BASIS,
 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and
 limitations under the License.
 

Author:
Mateusz Bysiek

Constructor Summary
protected OpenStageSDK_Test()
          Default constructor.
 
Method Summary
static void main(java.lang.String[] args)
          Subclasses must define this method, and only invoke own constructor here.
protected abstract  void writeXml(java.io.PrintWriter out)
          Here you should initialize all XML objects you would like to test.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OpenStageSDK_Test

protected OpenStageSDK_Test()
Default constructor.

Method Detail

writeXml

protected abstract void writeXml(java.io.PrintWriter out)
Here you should initialize all XML objects you would like to test. The generated content will be sent to console. Use any Xml sub-class, or your custom class.

Parameters:
out - PrintWriter created from System.out, you should use sendTo(out) at some point of your test to see any results

main

public static void main(java.lang.String[] args)
Subclasses must define this method, and only invoke own constructor here. This will start SDK test, which is defined in the writeXml(PrintWriter) method of a subclass. Test is meant to be generating sample XML output via sendTo(PrintWriter) method.

Parameters:
args - not used