HomeSort by relevance Sort by last modified time
    Searched defs:stubbings (Results 1 - 9 of 9) sorted by null

  /external/mockito/src/test/java/org/mockito/internal/junit/
UnusedStubbingsTest.java 28 UnusedStubbings stubbings = new UnusedStubbings(Collections.<Stubbing>emptyList()); local
31 stubbings.format("MyTest.myTestMethod", logger);
40 UnusedStubbings stubbings = new UnusedStubbings(Arrays.asList( local
47 stubbings.format("MyTest.myTestMethod", logger);
  /external/mockito/subprojects/inline/src/test/java/org/mockitoinline/
StubbingLocationTest.java 26 Set<Stubbing> stubbings = AllInvocationsFinder.findStubbings(Collections.singleton(mock)); local
27 assertEquals(1, stubbings.size());
28 String location = stubbings.iterator().next().getInvocation().getLocation().toString();
  /external/mockito/src/main/java/org/mockito/internal/debugging/
InvocationsPrinter.java 22 Collection<Stubbing> stubbings = Mockito.mockingDetails(mock).getStubbings(); local
23 if (invocations.isEmpty() && stubbings.isEmpty()) {
24 return "No interactions and stubbings found for mock: " + mock;
40 LinkedList<Stubbing> unused = ListUtil.filter(stubbings, new ListUtil.Filter<Stubbing>() {
49 sb.append("[Mockito] Unused stubbings of: ").append(mock).append("\n");
52 for(Stubbing s:stubbings) {
  /external/mockito/src/main/java/org/mockito/internal/invocation/finder/
AllInvocationsFinder.java 37 * Gets all stubbings from mocks. Invocations are ordered earlier first.
40 * @return stubbings
43 Set<Stubbing> stubbings = new TreeSet<Stubbing>(new StubbingComparator()); local
46 stubbings.addAll(fromSingleMock);
49 return stubbings;
  /external/mockito/src/main/java/org/mockito/internal/junit/
UnusedStubbingsFinder.java 23 * Finds unused stubbings
28 * Gets all unused stubbings for given set of mock objects, in order.
29 * Stubbings explicitily marked as LENIENT are not included.
32 Set<Stubbing> stubbings = AllInvocationsFinder.findStubbings(mocks); local
34 List<Stubbing> unused = filter(stubbings, new Filter<Stubbing>() {
44 * Gets unused stubbings per location. This method is less accurate than {@link #getUnusedStubbings(Iterable)}.
45 * It considers that stubbings with the same location (e.g. ClassFile + line number) are the same.
49 * In certain scenarios (detecting unused stubbings by JUnit runner), we need this exact level of accuracy.
54 Set<Stubbing> stubbings = AllInvocationsFinder.findStubbings(mocks); local
56 //1st pass, collect all the locations of the stubbings that were use
    [all...]
  /external/mockito/src/test/java/org/mockito/internal/
AllInvocationsFinderTest.java 82 List<Stubbing> stubbings = new ArrayList<Stubbing>(findStubbings(asList(mockOne, mockOne, mockTwo))); local
85 assertEquals(3, stubbings.size());
86 assertArgumentEquals(100, stubbings.get(0).getInvocation());
87 assertArgumentEquals(200, stubbings.get(1).getInvocation());
88 assertArgumentEquals(300, stubbings.get(2).getInvocation());
  /external/mockito/src/test/java/org/mockitousage/internal/junit/
UnusedStubbingsFinderTest.java 81 UnusedStubbings stubbings = finder.getUnusedStubbings((List) asList(mock1, mock2)); local
84 assertEquals(2, stubbings.size());
86 stubbings.toString());
98 UnusedStubbings stubbings = finder.getUnusedStubbings((List) asList(mock1, mock2)); local
101 assertEquals(1, stubbings.size());
103 stubbings.toString());
116 Collection stubbings = finder.getUnusedStubbingsByLocation((List) asList(mock1, mock2)); local
119 assertEquals(2, stubbings.size());
120 assertEquals("[mock1.simpleMethod(1);, mock2.simpleMethod(3);]", stubbings.toString());
131 //then technically unused stubbings exis
145 Collection stubbings = finder.getUnusedStubbingsByLocation((List) asList(mock1, mock2)); local
    [all...]
  /external/mockito/src/main/java/org/mockito/internal/exceptions/
Reporter.java 857 StringBuilder stubbings = new StringBuilder(); local
880 StringBuilder stubbings = new StringBuilder(); local
    [all...]
  /external/mockito/src/test/java/org/mockito/internal/util/
DefaultMockingDetailsTest.java 162 Collection<Stubbing> stubbings = mockingDetails(mock).getStubbings(); local
165 assertEquals(2, stubbings.size());
166 assertEquals("[mock.simpleMethod(1); stubbed with: [Returns: 1], mock.otherMethod(); stubbed with: [Returns: 2]]", stubbings.toString());
173 //when somebody manipulates stubbings directly
176 //then it does not affect stubbings of the mock

Completed in 362 milliseconds