@@ -0,0 +1,1728 @@
+package com.farmerbb.taskbar.util;%0A%0Aimport android.content.Context;%0Aimport android.view.Gravity;%0Aimport android.widget.Toast;%0A%0Aimport androidx.test.core.app.ApplicationProvider;%0A%0Aimport com.farmerbb.taskbar.R;%0A%0Aimport org.junit.Before;%0Aimport org.junit.Test;%0Aimport org.junit.runner.RunWith;%0Aimport org.robolectric.RobolectricTestRunner;%0Aimport org.robolectric.Shadows;%0Aimport org.robolectric.shadows.ShadowToast;%0A%0Aimport static org.junit.Assert.assertEquals;%0Aimport static org.junit.Assert.assertFalse;%0Aimport static org.junit.Assert.assertTrue;%0A%0A@RunWith(RobolectricTestRunner.class)%0Apublic class ToastFrameworkImplTest %7B%0A    private Context context;%0A    private ToastFrameworkImpl impl;%0A    private String message = %22test-message%22;%0A    private int length = Toast.LENGTH_LONG;%0A%0A    @Before%0A    public void setUp() %7B%0A        context = ApplicationProvider.getApplicationContext();%0A        impl = new ToastFrameworkImpl(context, message, length);%0A    %7D%0A%0A    @Test%0A    public void testShow() %7B%0A        impl.show();%0A        assertEquals(message, ShadowToast.getTextOfLatestToast());%0A        Toast toast = ShadowToast.getLatestToast();%0A        assertEquals(length, toast.getDuration());%0A        assertEquals(Gravity.BOTTOM %7C Gravity.CENTER_VERTICAL, toast.getGravity());%0A        assertEquals(0, toast.getXOffset());%0A        assertEquals(%0A                context.getResources().getDimensionPixelSize(R.dimen.tb_toast_y_offset),%0A                toast.getYOffset()%0A        );%0A    %7D%0A%0A    @Test%0A    public void testCancel() %7B%0A        impl.show();%0A        ShadowToast toast = Shadows.shadowOf(ShadowToast.getLatestToast());%0A        assertFalse(toast.isCancelled());%0A        impl.cancel();%0A        assertTrue(toast.isCancelled());%0A    %7D%0A%7D%0A

Add unit tests for ToastFrameworkImplTest