Package tests.apache.kato.tck.results.reporter

Source Code of tests.apache.kato.tck.results.reporter.TestVersionOSkeyProvider

/*******************************************************************************
* 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.
******************************************************************************/
package tests.apache.kato.tck.results.reporter;

import org.apache.kato.tck.results.reporter.SortKeyProvider;
import org.apache.kato.tck.results.reporter.TCKResultMatrix;
import org.apache.kato.tck.results.reporter.TestExecutionConfig;
import org.apache.kato.tck.results.reporter.VersionOSSortedProvider;

import junit.framework.TestCase;


public class TestVersionOSkeyProvider extends TestCase{
 
  public void testTwoLevelProvider1() {
   
    
    TCKResultMatrix matrix=new TCKResultMatrix(new VersionOSSortedProvider());
    SortKeyProvider provider=matrix.getKeyProvider();
    assertEquals(2,provider.keyDepth());
   
 
  }
  public void testTwoLevelProvider2() {
   
    
    SortKeyProvider provider=new VersionOSSortedProvider();
    TestExecutionConfig config=new TestExecutionConfig();
    config.version="<unknown>";
    config.os="<unknown>";
   
    assertEquals(2,provider.keyDepth());
    assertEquals("<unknown>/<unknown>",provider.getkey(config));
   
 
  }
  public void testTwoLevelProvider3() {
   
    
    SortKeyProvider provider=new VersionOSSortedProvider();
    TestExecutionConfig config=new TestExecutionConfig();
    config.os="Linux";
    config.version="1.5.0";
   
    assertEquals(2,provider.keyDepth());
    assertEquals("1.5.0/Linux",provider.getkey(config));
   
 
  }
}
TOP

Related Classes of tests.apache.kato.tck.results.reporter.TestVersionOSkeyProvider

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.