|
3 | 3 | namespace Lucene.Net.Util.JunitCompat |
4 | 4 | { |
5 | 5 |
|
6 | | - using After = org.junit.After; |
7 | | - using Assert = org.junit.Assert; |
8 | | - using Before = org.junit.Before; |
9 | | - using Test = org.junit.Test; |
10 | | - using JUnitCore = org.junit.runner.JUnitCore; |
11 | | - using Result = org.junit.runner.Result; |
| 6 | + using After = org.junit.After; |
| 7 | + using Assert = org.junit.Assert; |
| 8 | + using Before = org.junit.Before; |
| 9 | + using Test = org.junit.Test; |
| 10 | + using JUnitCore = org.junit.runner.JUnitCore; |
| 11 | + using Result = org.junit.runner.Result; |
12 | 12 |
|
13 | | - /* |
14 | | - * Licensed to the Apache Software Foundation (ASF) under one or more |
15 | | - * contributor license agreements. See the NOTICE file distributed with |
16 | | - * this work for additional information regarding copyright ownership. |
17 | | - * The ASF licenses this file to You under the Apache License, Version 2.0 |
18 | | - * (the "License"); you may not use this file except in compliance with |
19 | | - * the License. You may obtain a copy of the License at |
20 | | - * |
21 | | - * http://www.apache.org/licenses/LICENSE-2.0 |
22 | | - * |
23 | | - * Unless required by applicable law or agreed to in writing, software |
24 | | - * distributed under the License is distributed on an "AS IS" BASIS, |
25 | | - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
26 | | - * See the License for the specific language governing permissions and |
27 | | - * limitations under the License. |
28 | | - */ |
| 13 | + /* |
| 14 | + * Licensed to the Apache Software Foundation (ASF) under one or more |
| 15 | + * contributor license agreements. See the NOTICE file distributed with |
| 16 | + * this work for additional information regarding copyright ownership. |
| 17 | + * The ASF licenses this file to You under the Apache License, Version 2.0 |
| 18 | + * (the "License"); you may not use this file except in compliance with |
| 19 | + * the License. You may obtain a copy of the License at |
| 20 | + * |
| 21 | + * http://www.apache.org/licenses/LICENSE-2.0 |
| 22 | + * |
| 23 | + * Unless required by applicable law or agreed to in writing, software |
| 24 | + * distributed under the License is distributed on an "AS IS" BASIS, |
| 25 | + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 26 | + * See the License for the specific language governing permissions and |
| 27 | + * limitations under the License. |
| 28 | + */ |
29 | 29 |
|
30 | | - public class TestBeforeAfterOverrides : WithNestedTests |
31 | | - { |
32 | | - public TestBeforeAfterOverrides() : base(true) |
33 | | - { |
34 | | - } |
| 30 | + public class TestBeforeAfterOverrides : WithNestedTests |
| 31 | + { |
| 32 | + public TestBeforeAfterOverrides() : base(true) |
| 33 | + { |
| 34 | + } |
35 | 35 |
|
36 | | - public class Before1 : WithNestedTests.AbstractNestedTest |
37 | | - { |
| 36 | + public class Before1 : WithNestedTests.AbstractNestedTest |
| 37 | + { |
38 | 38 | //JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: |
39 | 39 | //ORIGINAL LINE: @Before public void before() |
40 | | - public virtual void Before() |
41 | | - { |
42 | | - } |
| 40 | + public virtual void Before() |
| 41 | + { |
| 42 | + } |
43 | 43 |
|
44 | | - public virtual void TestEmpty() |
45 | | - { |
46 | | - } |
47 | | - } |
48 | | - public class Before2 : Before1 |
49 | | - { |
50 | | - } |
51 | | - public class Before3 : Before2 |
52 | | - { |
| 44 | + public virtual void TestEmpty() |
| 45 | + { |
| 46 | + } |
| 47 | + } |
| 48 | + public class Before2 : Before1 |
| 49 | + { |
| 50 | + } |
| 51 | + public class Before3 : Before2 |
| 52 | + { |
53 | 53 | //JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: |
54 | 54 | //ORIGINAL LINE: @Override @Before public void before() |
55 | | - public override void Before() |
56 | | - { |
57 | | - } |
58 | | - } |
| 55 | + public override void Before() |
| 56 | + { |
| 57 | + } |
| 58 | + } |
59 | 59 |
|
60 | | - public class After1 : WithNestedTests.AbstractNestedTest |
61 | | - { |
| 60 | + public class After1 : WithNestedTests.AbstractNestedTest |
| 61 | + { |
62 | 62 | //JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: |
63 | 63 | //ORIGINAL LINE: @After public void after() |
64 | | - public virtual void After() |
65 | | - { |
66 | | - } |
| 64 | + public virtual void After() |
| 65 | + { |
| 66 | + } |
67 | 67 |
|
68 | | - public virtual void TestEmpty() |
69 | | - { |
70 | | - } |
71 | | - } |
72 | | - public class After2 : Before1 |
73 | | - { |
74 | | - } |
75 | | - public class After3 : Before2 |
76 | | - { |
| 68 | + public virtual void TestEmpty() |
| 69 | + { |
| 70 | + } |
| 71 | + } |
| 72 | + public class After2 : Before1 |
| 73 | + { |
| 74 | + } |
| 75 | + public class After3 : Before2 |
| 76 | + { |
77 | 77 | //JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: |
78 | 78 | //ORIGINAL LINE: @After public void after() |
79 | | - public virtual void After() |
80 | | - { |
81 | | - } |
82 | | - } |
| 79 | + public virtual void After() |
| 80 | + { |
| 81 | + } |
| 82 | + } |
83 | 83 |
|
84 | 84 | //JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: |
85 | 85 | //ORIGINAL LINE: @Test public void testBefore() |
86 | | - public virtual void TestBefore() |
87 | | - { |
88 | | - Result result = JUnitCore.runClasses(typeof(Before3)); |
89 | | - Assert.AreEqual(1, result.FailureCount); |
90 | | - Assert.IsTrue(result.Failures.Get(0).Trace.Contains("There are overridden methods")); |
91 | | - } |
| 86 | + public virtual void TestBefore() |
| 87 | + { |
| 88 | + Result result = JUnitCore.runClasses(typeof(Before3)); |
| 89 | + Assert.AreEqual(1, result.FailureCount); |
| 90 | + Assert.IsTrue(result.Failures.Get(0).Trace.Contains("There are overridden methods")); |
| 91 | + } |
92 | 92 |
|
93 | 93 | //JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: |
94 | 94 | //ORIGINAL LINE: @Test public void testAfter() |
95 | | - public virtual void TestAfter() |
96 | | - { |
97 | | - Result result = JUnitCore.runClasses(typeof(Before3)); |
98 | | - Assert.AreEqual(1, result.FailureCount); |
99 | | - Assert.IsTrue(result.Failures.Get(0).Trace.Contains("There are overridden methods")); |
100 | | - } |
101 | | - } |
| 95 | + public virtual void TestAfter() |
| 96 | + { |
| 97 | + Result result = JUnitCore.runClasses(typeof(Before3)); |
| 98 | + Assert.AreEqual(1, result.FailureCount); |
| 99 | + Assert.IsTrue(result.Failures.Get(0).Trace.Contains("There are overridden methods")); |
| 100 | + } |
| 101 | + } |
102 | 102 |
|
103 | 103 | } |
0 commit comments