Home | History | Annotate | Download | only in repository
      1 /*
      2  * Copyright (C) 2011 The Android Open Source Project
      3  *
      4  * Licensed under the Apache License, Version 2.0 (the "License");
      5  * you may not use this file except in compliance with the License.
      6  * You may obtain a copy of the License at
      7  *
      8  *      http://www.apache.org/licenses/LICENSE-2.0
      9  *
     10  * Unless required by applicable law or agreed to in writing, software
     11  * distributed under the License is distributed on an "AS IS" BASIS,
     12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     13  * See the License for the specific language governing permissions and
     14  * limitations under the License.
     15  */
     16 
     17 package com.android.sdklib.internal.repository;
     18 
     19 import junit.framework.TestCase;
     20 
     21 public class BrokenPackageTest extends TestCase {
     22 
     23     private BrokenPackage m;
     24 
     25     @Override
     26     protected void setUp() throws Exception {
     27         super.setUp();
     28 
     29         m = new BrokenPackage(null /*props*/,
     30                 "short description",
     31                 "long description",
     32                 12, // min api level
     33                 13, // exact api level
     34                 "os/path");
     35 
     36     }
     37 
     38     public final void testGetShortDescription() {
     39         assertEquals("short description", m.getShortDescription());
     40     }
     41 
     42     public final void testGetLongDescription() {
     43         assertEquals("long description", m.getLongDescription());
     44     }
     45 
     46     public final void testGetMinApiLevel() {
     47         assertEquals(12, m.getMinApiLevel());
     48     }
     49 
     50     public final void testGetExactApiLevel() {
     51         assertEquals(13, m.getExactApiLevel());
     52     }
     53 
     54     public void testInstallId() {
     55         assertEquals("", m.installId());
     56     }
     57 }
     58