Github user aledsage commented on a diff in the pull request:

    https://github.com/apache/brooklyn-server/pull/908#discussion_r154935928
  
    --- Diff: 
core/src/test/java/org/apache/brooklyn/enricher/stock/aggregator/AggregationJobTest.java
 ---
    @@ -0,0 +1,423 @@
    +/*
    + * Licensed to the Apache Software Foundation (ASF) under one
    + * or more contributor license agreements.  See the NOTICE file
    + * distributed with this work for additional information
    + * regarding copyright ownership.  The ASF licenses this file
    + * to you under the Apache License, Version 2.0 (the
    + * "License"); you may not use this file except in compliance
    + * with the License.  You may obtain a copy of the License at
    + *
    + *     http://www.apache.org/licenses/LICENSE-2.0
    + *
    + * Unless required by applicable law or agreed to in writing,
    + * software distributed under the License is distributed on an
    + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    + * KIND, either express or implied.  See the License for the
    + * specific language governing permissions and limitations
    + * under the License.
    + */
    +package org.apache.brooklyn.enricher.stock.aggregator;
    +
    +import static 
org.apache.brooklyn.enricher.stock.aggregator.AggregationJob.DASHBOARD_COST_PER_MONTH;
    +import static 
org.apache.brooklyn.enricher.stock.aggregator.AggregationJob.DASHBOARD_HA_PRIMARIES;
    +import static 
org.apache.brooklyn.enricher.stock.aggregator.AggregationJob.DASHBOARD_LICENSES;
    +import static 
org.apache.brooklyn.enricher.stock.aggregator.AggregationJob.DASHBOARD_LOCATIONS;
    +import static 
org.apache.brooklyn.enricher.stock.aggregator.AggregationJob.DASHBOARD_POLICY_HIGHLIGHTS;
    +import static org.testng.Assert.assertEquals;
    +
    +import java.util.ArrayList;
    +import java.util.HashMap;
    +import java.util.List;
    +import java.util.Map;
    +
    +import org.testng.annotations.BeforeMethod;
    +import org.testng.annotations.Test;
    +
    +import org.apache.brooklyn.api.entity.EntitySpec;
    +import org.apache.brooklyn.core.mgmt.internal.LocalManagementContext;
    +import org.apache.brooklyn.core.test.entity.LocalManagementContextForTests;
    +import org.apache.brooklyn.core.test.entity.TestApplication;
    +import org.apache.brooklyn.core.test.entity.TestEntity;
    +
    +public class AggregationJobTest {
    +
    +    TestApplication testApplication;
    +    TestEntity parentEntity;
    +    TestEntity childEntityOne;
    +    TestEntity childEntityTwo;
    +
    +    AggregationJob aggregationJob;
    +
    +    LocalManagementContext localManagementContext = 
LocalManagementContextForTests.newInstance();
    +
    +    @BeforeMethod
    --- End diff --
    
    Preference to always use `@BeforeMethod(alwaysRun=true)`. Then if someone 
marks one of the tests as `groups="Integeration"` for some reason, it still 
gets the setup method run.


---

Reply via email to