I am to write some one-off code in c#.net that will do some db manipulation of existing records and call a third party REST Api to update those records.
I proposed writing a unit test that does it. And running it in vs2012. My team mates were not too happy with the approach and preferred writing a console application to do it.
What does the community think? Which ones do you prefer and what are the pros and cons of each approach.
Update #1 - Exact scenario (to keep everyone happy) is as follows
An in-house API handles newsletter subscription for my website (well.. the website i work on). So these details are with this API (emails and their preference (subscribe or unsubscribe)). But to achieve certain things we keep a track of these preferences in our application db as well (SQL Server, as a table). Now there is some data in the applicaton's SQL db which is not in sync with the records that API manages. To do this, i want to be able to write a unit test/console app that will read some emails from a given list (maybe an excel), call the api to get preferences associated with those email ids and then update application's SQL db table.
Update #2 - Why i want to use unit test to preform this functionality
I want to add this test/tests to my existing test project. This way i will have access to ALL Dtos and Contracts (and objects in general) which are used in my application. Saves me time repeating/duplicating any code that i may need into a separate console app.
Since it will be part of the existing source control repo, i dont have to maintain a seprate project/application which i will have to if i do a console (if i want to share it with people)