This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class D_DependencyInversionProblem { | |
@AllArgsConstructor | |
private static class AuthenticateLogin { | |
public boolean login(User user){ | |
AuthenticationLinkedin authentication = new AuthenticationLinkedin(); | |
return authentication.login(user); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class D_DependencyInversionSolution { | |
@AllArgsConstructor | |
private static class AuthenticateLogin { | |
private final Authentication authentication; | |
public boolean login(User user){ | |
return authentication.login(user); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class D_DependencyInversionSolution { | |
private static class AuthenticateLogin { | |
private final Authentication authentication; | |
private AuthenticateLogin(Authentication authentication) { | |
this.authentication = authentication; | |
} | |
public boolean login(User user){ |
OlderNewer