コード例 #1
0
        public DevicesListViewTest()
        {
            ApplicationURLS.SetURLS("https://localhost", "https://localhost");

            string data = JsonConvert.SerializeObject(new DevicesListViewModel(Devices, 1), SerializerSettings.Json);

            fakeDevicesHandler.AddFakeResponse(
                new Uri($"{ApplicationURLS.Backend}/api/devices"),
                new HttpResponseMessage(HttpStatusCode.OK)
            {
                Content = new StringContent(data)
            });

            fakeDataRestService = new RestService(new HttpClient(fakeDevicesHandler), mockTokenAcquisition,
                                                  mockConfiguration);
        }
コード例 #2
0
        public MapViewControllerTest()
        {
            ApplicationURLS.SetURLS("https://localhost", "https://localhost");

            fakeDevicesHandler.AddFakeResponse(
                new Uri($"{ApplicationURLS.Backend}/api/devices"),
                new HttpResponseMessage(HttpStatusCode.OK)
            {
                Content = new StringContent(JsonConvert.SerializeObject(devices))
            });
            fakeDevicesHandler.AddFakeResponse(
                new Uri($"{ApplicationURLS.Backend}/api/projects"),
                new HttpResponseMessage(HttpStatusCode.OK)
            {
                Content = new StringContent(JsonConvert.SerializeObject(new List <Project>()))
            });
        }
コード例 #3
0
        private void SetDeploymentURLs(string buildConfiguration)
        {
            string jsonFile;

            using (StreamReader r = new StreamReader("deploymentUrls.json"))
            {
                jsonFile = r.ReadToEnd();
            }

            JObject deploymentFile = JObject.Parse(jsonFile);

            if (deploymentFile != null)
            {
                ApplicationURLS.SetURLS(
                    deploymentFile[buildConfiguration]["BackendBaseUrl"].ToString(),
                    deploymentFile[buildConfiguration]["WebAppBaseUrl"].ToString()
                    );
            }
        }
コード例 #4
0
 public DeviceConfigViewTest()
 {
     ApplicationURLS.SetURLS("https://localhost", "https://localhost");
 }
コード例 #5
0
 public DevicesDetailViewTest()
 {
     ApplicationURLS.SetURLS("https://localhost", "https://localhost");
 }
コード例 #6
0
 public ProjectListViewTest()
 {
     ApplicationURLS.SetURLS("https://localhost", "https://localhost");
 }