@ -1,12 +1,16 @@
package com.fr.design.formula ;
package com.fr.design.formula ;
import com.fr.design.i18n.Toolkit ;
import com.fr.general.GeneralUtils ;
import com.fr.general.GeneralUtils ;
import com.fr.invoke.Reflect ;
import com.fr.invoke.Reflect ;
import com.fr.log.FineLoggerFactory ;
import com.fr.log.FineLoggerFactory ;
import org.easymock.EasyMock ;
import org.easymock.EasyMock ;
import org.junit.Before ;
import org.junit.Test ;
import org.junit.Test ;
import org.junit.runner.RunWith ;
import org.junit.runner.RunWith ;
import org.mockito.Mockito ;
import org.powermock.api.easymock.PowerMock ;
import org.powermock.api.easymock.PowerMock ;
import org.powermock.api.mockito.PowerMockito ;
import org.powermock.core.classloader.annotations.PrepareForTest ;
import org.powermock.core.classloader.annotations.PrepareForTest ;
import org.powermock.modules.junit4.PowerMockRunner ;
import org.powermock.modules.junit4.PowerMockRunner ;
@ -19,9 +23,15 @@ import static org.junit.Assert.fail;
* Created by plough on 2018 / 12 / 7 .
* Created by plough on 2018 / 12 / 7 .
* /
* /
@RunWith ( PowerMockRunner . class )
@RunWith ( PowerMockRunner . class )
@PrepareForTest ( GeneralUtils . class )
@PrepareForTest ( { GeneralUtils . class , Toolkit . class } )
public class FunctionConstantsTest {
public class FunctionConstantsTest {
@Before
public void setUp ( ) {
PowerMockito . mockStatic ( Toolkit . class ) ;
PowerMockito . when ( Toolkit . i18nText ( Mockito . anyString ( ) ) ) . thenReturn ( "test" ) ;
}
@Test
@Test
public void testNewInstanceFail ( ) throws Exception {
public void testNewInstanceFail ( ) throws Exception {
try {
try {