Skip to content

Bug: inject or instantiate Feather class does not work #12

Description

@sealor

Hello feather team,

your DI framework fits very well for my use case. But unfortunately there is a bug which makes it unusable for me.

Could you please fix this issue?! Thank you.

import org.codejargon.feather.Feather;
import org.codejargon.feather.Provides;
import org.junit.Test;

import static org.codejargon.feather.Feather.with;
import static org.junit.Assert.assertEquals;

public class FeatherTest {

    @Test
    public void injectFeatherShouldWork() {
        Feather feather = with(new Object() {
            @Provides
            public String createString(Feather feather) {
                return feather.toString();
            }
        });

        assertEquals(feather.toString(), feather.instance(String.class));
    }

    @Test
    public void instantiateFeatherShouldWork() {
        Feather feather = with();
        assertEquals(feather, feather.instance(Feather.class));
    }

}

Best regards,
Stefan

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions