Home | History | Annotate | Download | only in mocking
      1 /*
      2  *  Copyright 2010 Google Inc.
      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 package com.google.android.testing.mocking;
     17 
     18 
     19 /**
     20  * Support class for testing.
     21  *
     22  * @author swoodward (at) google.com (Stephen Woodward)
     23  */
     24 public class ClassDoesWorkInConstructor {
     25   public ClassDoesWorkInConstructor() {
     26     this.fooInt(1);
     27     this.fooByte((byte) 1);
     28     this.fooShort((short) 1);
     29     this.fooChar('a');
     30     this.fooLong(1L);
     31     this.fooFloat(1.0f);
     32     this.fooDouble(1.0);
     33     this.fooBoolean(true);
     34     this.fooObject("hello");
     35     this.fooVoid();
     36   }
     37 
     38   public void fooVoid() {
     39     throw new IllegalStateException("I wasn't mocked!!");
     40   }
     41 
     42   public Object fooObject(String string) {
     43     throw new IllegalStateException("I wasn't mocked!!");
     44   }
     45 
     46   public boolean fooBoolean(boolean b) {
     47     throw new IllegalStateException("I wasn't mocked!!");
     48   }
     49 
     50   public double fooDouble(double d) {
     51     throw new IllegalStateException("I wasn't mocked!!");
     52   }
     53 
     54   public float fooFloat(float f) {
     55     throw new IllegalStateException("I wasn't mocked!!");
     56   }
     57 
     58   public long fooLong(long i) {
     59     throw new IllegalStateException("I wasn't mocked!!");
     60   }
     61 
     62   public char fooChar(char c) {
     63     throw new IllegalStateException("I wasn't mocked!!");
     64   }
     65 
     66   public short fooShort(short s) {
     67     throw new IllegalStateException("I wasn't mocked!!");
     68   }
     69 
     70   public byte fooByte(byte b) {
     71     throw new IllegalStateException("I wasn't mocked!!");
     72   }
     73 
     74   public int fooInt(int i) {
     75     throw new IllegalStateException("I wasn't mocked!!");
     76   }
     77 }
     78