JAVA-13721 Removed mockmaker file, not needed with mockito v5+

This commit is contained in:
Dhawal Kapil 2023-05-31 23:38:48 +05:30
parent b58c47df23
commit 492ff5b888
2 changed files with 0 additions and 13 deletions

View File

@ -3,10 +3,8 @@ package com.baeldung.mockito.mockfinal;
import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThat;
import static org.mockito.Mockito.mock; import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when; import static org.mockito.Mockito.when;
import static org.mockito.Mockito.withSettings;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
import org.mockito.MockMakers;
import com.baeldung.mockito.FinalList; import com.baeldung.mockito.FinalList;
import com.baeldung.mockito.MyList; import com.baeldung.mockito.MyList;
@ -30,14 +28,4 @@ class MockFinalsUnitTest {
assertThat(mock.size()).isNotEqualTo(1); assertThat(mock.size()).isNotEqualTo(1);
} }
@Test
public void whenMockFinalMethodMockWorks_withInlineMockMaker() {
MyList myList = new MyList();
MyList mock = mock(MyList.class, withSettings().mockMaker(MockMakers.INLINE));
when(mock.finalMethod()).thenReturn(1);
assertThat(mock.finalMethod()).isNotEqualTo(myList.finalMethod());
}
} }