Home
last modified time | relevance | path

Searched refs:stubbings (Results 1 – 10 of 10) sorted by relevance

/external/mockito/src/test/java/org/mockitousage/internal/junit/
DUnusedStubbingsFinderTest.java81 UnusedStubbings stubbings = finder.getUnusedStubbings((List) asList(mock1, mock2)); in some_unused_stubbings() local
84 assertEquals(2, stubbings.size()); in some_unused_stubbings()
86 stubbings.toString()); in some_unused_stubbings()
98 UnusedStubbings stubbings = finder.getUnusedStubbings((List) asList(mock1, mock2)); in unused_and_lenient_stubbings() local
101 assertEquals(1, stubbings.size()); in unused_and_lenient_stubbings()
103 stubbings.toString()); in unused_and_lenient_stubbings()
116 Collection stubbings = finder.getUnusedStubbingsByLocation((List) asList(mock1, mock2)); in some_unused_stubbings_by_location() local
119 assertEquals(2, stubbings.size()); in some_unused_stubbings_by_location()
120 assertEquals("[mock1.simpleMethod(1);, mock2.simpleMethod(3);]", stubbings.toString()); in some_unused_stubbings_by_location()
145 Collection stubbings = finder.getUnusedStubbingsByLocation((List) asList(mock1, mock2)); in deduplicates_stubbings_by_location() local
[all …]
/external/mockito/src/main/java/org/mockito/internal/junit/
DUnusedStubbingsFinder.java32 Set<Stubbing> stubbings = AllInvocationsFinder.findStubbings(mocks); in getUnusedStubbings() local
34 List<Stubbing> unused = filter(stubbings, new Filter<Stubbing>() { in getUnusedStubbings()
54 Set<Stubbing> stubbings = AllInvocationsFinder.findStubbings(mocks); in getUnusedStubbingsByLocation() local
59 for (Stubbing s : stubbings) { in getUnusedStubbingsByLocation()
71 for (Stubbing s : stubbings) { in getUnusedStubbingsByLocation()
DDefaultStubbingLookupListener.java56 …ic List<Invocation> potentialArgMismatches(Invocation invocation, Collection<Stubbing> stubbings) { in potentialArgMismatches() argument
58 for (Stubbing s : stubbings) { in potentialArgMismatches()
/external/mockito/src/test/java/org/mockito/internal/
DAllInvocationsFinderTest.java82 …List<Stubbing> stubbings = new ArrayList<Stubbing>(findStubbings(asList(mockOne, mockOne, mockTwo)… in provides_stubbings_in_order() local
85 assertEquals(3, stubbings.size()); in provides_stubbings_in_order()
86 assertArgumentEquals(100, stubbings.get(0).getInvocation()); in provides_stubbings_in_order()
87 assertArgumentEquals(200, stubbings.get(1).getInvocation()); in provides_stubbings_in_order()
88 assertArgumentEquals(300, stubbings.get(2).getInvocation()); in provides_stubbings_in_order()
/external/mockito/src/test/java/org/mockito/internal/junit/
DUnusedStubbingsTest.java28 UnusedStubbings stubbings = new UnusedStubbings(Collections.<Stubbing>emptyList()); in no_unused_stubbings() local
31 stubbings.format("MyTest.myTestMethod", logger); in no_unused_stubbings()
40 UnusedStubbings stubbings = new UnusedStubbings(Arrays.asList( in unused_stubbings() local
47 stubbings.format("MyTest.myTestMethod", logger); in unused_stubbings()
/external/mockito/src/main/java/org/mockito/internal/debugging/
DInvocationsPrinter.java22 Collection<Stubbing> stubbings = Mockito.mockingDetails(mock).getStubbings(); in printInvocations() local
23 if (invocations.isEmpty() && stubbings.isEmpty()) { in printInvocations()
40 LinkedList<Stubbing> unused = ListUtil.filter(stubbings, new ListUtil.Filter<Stubbing>() { in printInvocations()
52 for(Stubbing s:stubbings) { in printInvocations()
/external/mockito/src/main/java/org/mockito/internal/invocation/finder/
DAllInvocationsFinder.java43 Set<Stubbing> stubbings = new TreeSet<Stubbing>(new StubbingComparator()); in findStubbings() local
46 stubbings.addAll(fromSingleMock); in findStubbings()
49 return stubbings; in findStubbings()
/external/mockito/subprojects/inline/src/test/java/org/mockitoinline/
DStubbingLocationTest.java26 Set<Stubbing> stubbings = AllInvocationsFinder.findStubbings(Collections.singleton(mock)); in stubbing_location_should_be_the_correct_point() local
27 assertEquals(1, stubbings.size()); in stubbing_location_should_be_the_correct_point()
28 String location = stubbings.iterator().next().getInvocation().getLocation().toString(); in stubbing_location_should_be_the_correct_point()
/external/mockito/src/main/java/org/mockito/internal/exceptions/
DReporter.java857 StringBuilder stubbings = new StringBuilder(); in formatUnncessaryStubbingException() local
860 stubbings.append("\n ").append(count++).append(". ").append(u.getLocation()); in formatUnncessaryStubbingException()
869 … "Following stubbings are unnecessary (click to navigate to relevant line of code):" + stubbings, in formatUnncessaryStubbingException()
880 StringBuilder stubbings = new StringBuilder(); in potentialStubbingProblem() local
883 stubbings.append(" ").append(count++).append(". ").append(s); in potentialStubbingProblem()
884 stubbings.append("\n ").append(s.getLocation()).append("\n"); in potentialStubbingProblem()
886 stubbings.deleteCharAt(stubbings.length()-1); //remove trailing end of line in potentialStubbingProblem()
894 stubbings, in potentialStubbingProblem()
/external/mockito/src/test/java/org/mockito/internal/util/
DDefaultMockingDetailsTest.java162 Collection<Stubbing> stubbings = mockingDetails(mock).getStubbings(); in provides_stubbings_of_mock_in_declaration_order() local
165 assertEquals(2, stubbings.size()); in provides_stubbings_of_mock_in_declaration_order()
166 …tubbed with: [Returns: 1], mock.otherMethod(); stubbed with: [Returns: 2]]", stubbings.toString()); in provides_stubbings_of_mock_in_declaration_order()