Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6cd149f5 authored by Thomas Stuart's avatar Thomas Stuart
Browse files

adjust CallControl tests

API changes:
- change setMuteState to requestMuteState
- change @Nullable CallControl to @NonNull

Impl changes:
- remove ClientTransactionalWrapper from the hidden contructor
- remove PhoneAccountHandle from the hidden constructor
- remove the if serviceInterface != null clause

Fixes: 320507724
Test: adjusted CallControlTest class
Change-Id: I900abce261fa636cffdf52b7c2edf5e8cbf04637
parent d225bde8
Loading
Loading
Loading
Loading
+2 −17
Original line number Diff line number Diff line
@@ -39,14 +39,7 @@ import org.mockito.MockitoAnnotations;
import java.util.UUID;

public class CallControlTest extends TelecomTestCase {

    private static final PhoneAccountHandle mHandle = new PhoneAccountHandle(
            new ComponentName("foo", "bar"), "1");

    @Mock
    private ICallControl mICallControl;
    @Mock
    private ClientTransactionalServiceRepository mRepository;
    @Mock private ICallControl mICallControl;
    private static final String CALL_ID_1 = UUID.randomUUID().toString();

    @Override
@@ -64,15 +57,7 @@ public class CallControlTest extends TelecomTestCase {

    @Test
    public void testGetCallId() {
        CallControl control = new CallControl(CALL_ID_1, mICallControl, mRepository, mHandle);
        CallControl control = new CallControl(CALL_ID_1, mICallControl);
        assertEquals(CALL_ID_1, control.getCallId().toString());
    }

    @Test
    public void testCallControlHitsIllegalStateException() {
        CallControl control = new CallControl(CALL_ID_1, null, mRepository, mHandle);
        assertThrows(IllegalStateException.class, () ->
                control.setInactive(Runnable::run, result -> {
                }));
    }
}