/// The main entry point for the application. static void Main() { // Read the uri that is set in the App.config file. ("http://localhost:62273/api/ServerData") var uri = System.Configuration.ConfigurationManager.AppSettings["serviceURL"]; // Instantiate the PostController with proper uri PostController control = new PostController(uri); // The PostController is the controller of the program, delegating tasks to the handlers control.ExtractAndSerializeData(); }
private PostController Setup() { entity = new MasterEntity(new EnvironmentData {logTime = DateTime.Now }, null, null); httpHandlerMoq = new Mock<IHTTPHandler>(); dataExtractMoq = new Mock<IDataExtract>(); dataExtractMoq.Setup(m => m.GetData()).Returns(entity); //httpHandlerMoq.Setup(m => m.PostMasterEntity)). var sut = new PostController("", httpHandlerMoq.Object, dataExtractMoq.Object); return sut; }