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

Improve UtModel construction #2517

Merged
merged 4 commits into from
Aug 17, 2023
Merged

Improve UtModel construction #2517

merged 4 commits into from
Aug 17, 2023

Conversation

IlyaMuravjov
Copy link
Collaborator

Description

How to test

Manual tests

Generate integration tests for all methods in the following class.

@Service
public class Examples {
    public interface SomeInterface {}
    public class SomeInvocationHandler implements InvocationHandler {
        @Override
        public Object invoke(Object proxy, Method method, Object[] args) throws InvocationTargetException, IllegalAccessException {
            return method.invoke(this, args);
        }
    }

    public SomeInterface proxy() {
         return (SomeInterface) Proxy.newProxyInstance(
            this.getClass().getClassLoader(),
            new Class[]{ SomeInterface.class },
            new SomeInvocationHandler()
        );
    }

    public Map<String, String> emptyMap() {
        return Collections.emptyMap();
    }

    public static class MyTreeMap extends TreeMap<String, String> {
        public MyTreeMap() {
            super();
            put("key1", "value1");
            put("key2", "value2");
        }
    }

    public Map<String, String> myTreeMap1() {
        return new MyTreeMap();
    }

    public MyTreeMap myTreeMap2() {
        return new MyTreeMap();
    }
}

Self-check list

  • I've set the proper labels for my PR (at least, for category and component).
  • PR title and description are clear and intelligible.
  • I've added enough comments to my code, particularly in hard-to-understand areas.
  • The functionality I've repaired, changed or added is covered with automated tests.
  • Manual tests have been provided optionally.
  • The documentation for the functionality I've been working on is up-to-date.

@IlyaMuravjov IlyaMuravjov added comp-instrumented-process Issue is related to Instrumented process ctg-bug-fix PR is fixing a bug labels Aug 15, 2023
@EgorkaKulikov EgorkaKulikov merged commit 8ef6bd5 into main Aug 17, 2023
@EgorkaKulikov EgorkaKulikov deleted the ilya_m/model_construction branch August 17, 2023 05:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
comp-instrumented-process Issue is related to Instrumented process ctg-bug-fix PR is fixing a bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Incorrect cast of EmptyMap to LinkedHashMap detected in runtime only
2 participants