• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2017 Mockito contributors
3  * This program is made available under the terms of the MIT License.
4  */
5 package org.mockitoutil;
6 
7 import org.junit.Test;
8 
9 import static org.junit.Assert.assertEquals;
10 
11 public class TestBaseTest extends TestBase {
12 
filters_line_no_from_stack_trace()13     @Test public void filters_line_no_from_stack_trace() {
14         assertEquals("", filterLineNo(""));
15         assertEquals("asdf", filterLineNo("asdf"));
16         assertEquals("asdf (FooBar.java:0) blah", filterLineNo("asdf (FooBar.java:23) blah"));
17         assertEquals("asdf\n(FooBar.java:0)\nblah", filterLineNo("asdf\n(FooBar.java:123123)\nblah"));
18         assertEquals("asdf\n(FooBar.java:0)\n(Xxx.java:0)blah", filterLineNo("asdf\n(FooBar.java:2)\n(Xxx.java:1)blah"));
19 
20         assertEquals("asdf\n(FooBar.java:0)\nXxx.java:20)blah", filterLineNo("asdf\n(FooBar.java:2)\nXxx.java:20)blah"));
21     }
22 }
23