PyUtil#removeQualifier handles possible whitespace before the dot
[idea/community.git] / python / testSrc / com / jetbrains / python / quickFixes / PyMakeFunctionFromMethodQuickFixTest.java
1 /*
2  * Copyright 2000-2013 JetBrains s.r.o.
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.jetbrains.python.quickFixes;
17
18 import com.jetbrains.python.PyBundle;
19 import com.jetbrains.python.PyQuickFixTestCase;
20 import com.jetbrains.python.inspections.PyMethodMayBeStaticInspection;
21
22 /**
23  * User: ktisha
24  */
25 public class PyMakeFunctionFromMethodQuickFixTest extends PyQuickFixTestCase {
26
27   public void testOneParam() {
28     doQuickFixTest(PyMethodMayBeStaticInspection.class, PyBundle.message("QFIX.NAME.make.function"));
29   }
30
31   public void testTwoParams() {
32     doQuickFixTest(PyMethodMayBeStaticInspection.class, PyBundle.message("QFIX.NAME.make.function"));
33   }
34
35   public void testEmptyParam() {
36     doQuickFixTest(PyMethodMayBeStaticInspection.class, PyBundle.message("QFIX.NAME.make.function"));
37   }
38
39   public void testFirstMethod() {
40     doQuickFixTest(PyMethodMayBeStaticInspection.class, PyBundle.message("QFIX.NAME.make.function"));
41   }
42
43   public void testEmptyStatementList() {
44     doQuickFixTest(PyMethodMayBeStaticInspection.class, PyBundle.message("QFIX.NAME.make.function"));
45   }
46
47   public void testNoSelf() {
48     doQuickFixTest(PyMethodMayBeStaticInspection.class, PyBundle.message("QFIX.NAME.make.function"));
49   }
50
51   public void testUpdateUsage() {
52     doQuickFixTest(PyMethodMayBeStaticInspection.class, PyBundle.message("QFIX.NAME.make.function"));
53   }
54
55   public void testUsageClassCallArgument() {
56     doQuickFixTest(PyMethodMayBeStaticInspection.class, PyBundle.message("QFIX.NAME.make.function"));
57   }
58
59   public void testUsageAssignment() {
60     doQuickFixTest(PyMethodMayBeStaticInspection.class, PyBundle.message("QFIX.NAME.make.function"));
61   }
62
63   public void testUsageImport() {
64     doMultifilesTest(PyMethodMayBeStaticInspection.class, PyBundle.message("QFIX.NAME.make.function"), new String[]{"test.py"});
65   }
66
67   public void testUsageImport1() {
68     doMultifilesTest(PyMethodMayBeStaticInspection.class, PyBundle.message("QFIX.NAME.make.function"), new String[]{"test.py"});
69   }
70
71   public void testUsageImport2() {
72     doMultifilesTest(PyMethodMayBeStaticInspection.class, PyBundle.message("QFIX.NAME.make.function"), new String[]{"test.py"});
73   }
74
75   public void testUsageSelf() {
76     doQuickFixTest(PyMethodMayBeStaticInspection.class, PyBundle.message("QFIX.NAME.make.function"));
77   }
78
79   public void testLocalClass() {
80     doQuickFixTest(PyMethodMayBeStaticInspection.class, PyBundle.message("QFIX.NAME.make.function"));
81   }
82
83   public void testRemoveQualifiers() {
84     doQuickFixTest(PyMethodMayBeStaticInspection.class, PyBundle.message("QFIX.NAME.make.function"));
85   }
86 }