Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test to prevent adding methods to NewRelic #1597

Merged
merged 1 commit into from
Nov 27, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
/*
*
* * Copyright 2023 New Relic Corporation. All rights reserved.
* * SPDX-License-Identifier: Apache-2.0
*
*/

package com.newrelic.api.agent;

import org.junit.Assert;
import org.junit.Test;

import java.lang.reflect.Method;

public class NewRelicApiTest {

/**
* This method will fail if a method is added to the NewRelic class.
* If your change broke this test, could you add the method to one of the interfaces that can be returned from the Agent?
*/
@Test
public void checkMethodCount() {
Method[] methods = NewRelic.class.getDeclaredMethods();
Assert.assertEquals(34, methods.length);
}
}
Loading