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

Commit 1c6e0982 authored by Kweku Adams's avatar Kweku Adams
Browse files

Rename test.

The plan is to test actual Agent behavior in mockingservicestests. This
test only covers the inner TrendCalculator class, so renaming to avoid a
name conflict within the same package.

Bug: 158300259
Test: atest FrameworksServicesTests:AgentTrendCalculatorTest
Change-Id: Id007f2d92293cbdf19fb030b5cd71a3fc23fedb5
parent 46f76172
Loading
Loading
Loading
Loading
+8 −8
Original line number Diff line number Diff line
@@ -40,10 +40,10 @@ import org.junit.runner.RunWith;

import java.util.List;

/** Tests various aspects of the Agent. */
/** Tests the TrendCalculator in the Agent. */
@RunWith(AndroidJUnit4.class)
@SmallTest
public class AgentTest {
public class AgentTrendCalculatorTest {

    private MockEconomicPolicy mEconomicPolicy;

@@ -98,7 +98,7 @@ public class AgentTest {
    }

    @Test
    public void testTrendCalculator_NoOngoingEvents() {
    public void testNoOngoingEvents() {
        TrendCalculator trendCalculator = new TrendCalculator();
        mEconomicPolicy.mEventCosts.put(JobSchedulerEconomicPolicy.ACTION_JOB_TIMEOUT, 20);

@@ -128,7 +128,7 @@ public class AgentTest {
    }

    @Test
    public void testTrendCalculator_NoAffordabilityNotes() {
    public void testNoAffordabilityNotes() {
        TrendCalculator trendCalculator = new TrendCalculator();

        OngoingEvent[] events = new OngoingEvent[]{
@@ -165,7 +165,7 @@ public class AgentTest {
    }

    @Test
    public void testTrendCalculator_NoTrendToThreshold() {
    public void testNoTrendToThreshold() {
        TrendCalculator trendCalculator = new TrendCalculator();
        mEconomicPolicy.mEventCosts.put(JobSchedulerEconomicPolicy.ACTION_JOB_MAX_RUNNING, 10);

@@ -213,7 +213,7 @@ public class AgentTest {
    }

    @Test
    public void testTrendCalculator_SimpleTrendToThreshold() {
    public void testSimpleTrendToThreshold() {
        TrendCalculator trendCalculator = new TrendCalculator();
        mEconomicPolicy.mEventCosts.put(JobSchedulerEconomicPolicy.ACTION_JOB_MAX_START, 20);

@@ -257,7 +257,7 @@ public class AgentTest {
    }

    @Test
    public void testTrendCalculator_SelectCorrectThreshold() {
    public void testSelectCorrectThreshold() {
        TrendCalculator trendCalculator = new TrendCalculator();
        mEconomicPolicy.mEventCosts.put(JobSchedulerEconomicPolicy.ACTION_JOB_MAX_START, 20);
        mEconomicPolicy.mEventCosts.put(JobSchedulerEconomicPolicy.ACTION_JOB_HIGH_START, 15);
@@ -307,7 +307,7 @@ public class AgentTest {
    }

    @Test
    public void testTrendCalculator_TrendsToBothThresholds() {
    public void testTrendsToBothThresholds() {
        TrendCalculator trendCalculator = new TrendCalculator();
        mEconomicPolicy.mEventCosts.put(JobSchedulerEconomicPolicy.ACTION_JOB_MAX_START, 20);
        mEconomicPolicy.mEventCosts.put(AlarmManagerEconomicPolicy.ACTION_ALARM_CLOCK, 50);