Approach for module 6 Money

sir i am on module 6 from past 2 days like i got the gist of the module that our first service provider is not sufficient so we have to import another third party api so i started working on it. They have provided the “StockService” interface which has getStockQuote function , i implemented this interface in both the class "TiingoService " & “AlphaadvantageService”
then I started working in TiingoServie class
. I copied all the necessary code from PortfolioTradeImp --> TiingoService
and returned the objects of List in ascending order of getDate in getStockQuote
I ran “./gradlew test --tests TiingoServiceTest”
and BUILD SUCCESS prompt came

then I started working on enum StockQuoteserviceFactory
I wrote the getService function as if string is tiingo It will return instance of Tiingoservice and if anything else than instance of AlphaAdvantage
I ran “./gradlew test --tests StockQuoteServiceFactory”
FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ‘:qmoney:test’.

No tests found for given includes: [StockQuoteServiceFactory](–tests filter)

then I started working on PortfolioManagerFactory

marked the earlier constructor as @Deprecated.
Implement the method in such a way that it will return new Instance of PortfolioManager
// using RestTemplate and provider name.
even I completed this task
then I made the constructor in PortfolioManagerImpl of those two arguments RestTemplate and provider name.

I didn’t understand what did it mean --> As a first step, Create appropriate instance of StoockQuoteService using
// StockQuoteServiceFactory and then use the same instance of StockQuoteService to create the
// instance of PortfolioManager.

what I did is I made the function which returns the instance return new PortfolioManagerImpl(stockQuotesService);

and made the constructor of this argument stockQuotesService in PortfolioMangerImpl

then I went to PortFolioManagerImpl class
in function getStockQuotes
I used return stockQuotesService.getStockQuote(symbol, from, to);
and called getStockQuote in my public List calculateAnnualizedReturn(List portfolioTrades, LocalDate endDate)
throws JsonProcessingException
then I ran ./gradlew test --tests PortfolioManagerTest
BUILD SUCCESSFUL

then I ran
./gradlew test --tests PortfolioManagerFactory
FAILURE: Build failed with an exception.

then I moved on the PortfolioManagerApplication

StockQuotesService stockQuotesService = StockQuoteServiceFactory.INSTANCE.getService(“tiingo”, restTemplate);
PortfolioManagerFactory.getPortfolioManager(stockQuotesService);
PortfolioManager portfolioManager = PortfolioManagerFactory
.getPortfolioManager(“tiingo”,restTemplate); // I hard coded tiingo as argument

I didn’t even touched alpha advantage yet…

can anyone help me or guide me I am stuck in it from past two days

even I am not able to crack the UML diagram

Hi @hrithik_cr7
Looks like you are facing challenges in the current module.

Below are a few similar topics raised by other users which you might find usefull

Note - This is a BETA Feature,if you find this helpful, kindly let us know.
Feedback link - https://forms.gle/cmxN5pdTXgnwgC986

Kindly mark this as a solution if this has helped you solve your query

Closing this topic as your issue is resolved by the mentor. If it is still not resolved, Kindly un-mark the accepted solution or create a new topic and post this question as a reference link in the description of the new topic.

Re-opening this topic as the previously accepted solution was just Un-marked.

Closing this topic as there is no response since last 12 hours. Please feel free to create a new topic and post this question as a reference link in the description of the new topic.