Skip to content

ttaher/cross-solar-dotnet_TalatAbdelbaky.patch

Repository files navigation

Project Assessment:
	Cross-Solar is a backend web application created by a startup company called “Green Energy Analytics” in Texas - USA. This application collects energy analytics for solar panels every hour.

Notes:
	- Project accepts data for registered panels only, and to register panel; serial number must be 16 characters length, and latitude/longitude contains 6 decimal places.
	- Frontend application excluded from the current scope. It is a separate, fully-functioning application handled by another team, so we do not want to modify it.

Tasks:
	1)	Increase unit test coverage to reach 60%, achieving more than 60% will only consume your valuable time without extra score.
	2)	Find bugs and fix them, hint: we provided Cross-Solar application in a good structure, so no need to spend your valuable time on structure modifications,  just focus on fixing bugs.
	3) 	Frontend team wants to display panel’s all historical data in a chart, in which each point represents electricity generated by this panel each day [sum, min, max, average] up to the end 		of previous day , your goal is to implement backend part of this task, API specifications already there in code as agreed with Frontend team, and it is ok to implement this task without 		any optimization.

Prerequisites:
	GIT
	VS 2017(.NET Core 2.0)
	SQLServer 2012
	(Developer/Express Edition) 

Development Environment:
	Cross-solar application:
	
	- Modify the database connection string as per your instance and authentication.
	- On any terminal move to the "CrossSolar" folder (the folder containing the "CrossSolar.csproj" file) and execute these commands:

	dotnet restore
	dotnet build
	dotnet ef database update

	- Now you can call the api using any tool, like Postman, Curl, etc 
	
	- To check code coverage, execute the batch script:
	coverage.bat

Production Environment:
  This is how we are going to run and evaluate your submission, so please make sure to run below steps before submitting your answer.

  1) Make sure to run unit tests,check code coverage, ensure application is compiling and all dependencies are included.
  2) Commit everything to using (git add --all && git commit -m "My submission")
  3) Create patch file with name without spaces 'cross-solar-dotnet_<YourNameHere>.patch', using the specified tag as the starting point (git format-patch initial-commit --stdout > cross-solar-dotnet_<yournamehere>.patch)
  4) Store your file in a shared location where Crossover team can access and download it for evaluation. and add your sharable link in the answer field of this question.


Releases

No releases published

Packages

No packages published