Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

com.jguild.jrpm.test
Class NativeRPMTest  view NativeRPMTest download NativeRPMTest.java

java.lang.Object
  extended byjunit.framework.Assert
      extended byjunit.framework.TestCase
          extended bycom.jguild.jrpm.test.NativeRPMTest
All Implemented Interfaces:
junit.framework.Test

public class NativeRPMTest
extends junit.framework.TestCase

Test case to compare jRPM against an installed instance of rpm.


Field Summary
private static org.apache.log4j.Logger logger
           
private static java.lang.String RPM_FILE
           
 
Fields inherited from class junit.framework.TestCase
 
Constructor Summary
NativeRPMTest()
           
 
Method Summary
private  java.io.InputStream getTestRPMInputStream(java.lang.String name)
           
private  java.net.URL getTestRPMURL(java.lang.String name)
           
private static java.lang.String runRPM(java.lang.String command)
          Run an installed instance of rpm with the defined parameters.
protected  void setUp()
          Sets up the fixture, for example, open a network connection.
protected  void tearDown()
          Tears down the fixture, for example, close a network connection.
 void testKnownTypes()
          Test if all tag names are supported by jRPM.
 void testTestRPMFile()
          Tests the jRPM for correct returned tags.
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, run, runBare, runTest, setName, toString
 
Methods inherited from class junit.framework.Assert
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

logger

private static final org.apache.log4j.Logger logger

RPM_FILE

private static final java.lang.String RPM_FILE
See Also:
Constant Field Values
Constructor Detail

NativeRPMTest

public NativeRPMTest()
Method Detail

testKnownTypes

public void testKnownTypes()
                    throws java.io.IOException
Test if all tag names are supported by jRPM. The tags will be querried from a installed instance of rpm with the option --querytags. Than all tags are compared to the tags defined in jRPM.


testTestRPMFile

public void testTestRPMFile()
                     throws java.io.IOException
Tests the jRPM for correct returned tags. The tags will be querried from a installed instance of rpm with the options --querytags. Than the results of rpm and jRPM are compared for each tag. If one tag differs the test will fail.


setUp

protected void setUp()
              throws java.lang.Exception
Description copied from class: junit.framework.TestCase
Sets up the fixture, for example, open a network connection. This method is called before a test is executed.


tearDown

protected void tearDown()
                 throws java.lang.Exception
Description copied from class: junit.framework.TestCase
Tears down the fixture, for example, close a network connection. This method is called after a test is executed.


getTestRPMInputStream

private java.io.InputStream getTestRPMInputStream(java.lang.String name)

getTestRPMURL

private java.net.URL getTestRPMURL(java.lang.String name)

runRPM

private static java.lang.String runRPM(java.lang.String command)
                                throws java.io.IOException
Run an installed instance of rpm with the defined parameters.