Ejemplo n.º 1
0
        public void GetWithNameTest()
        {
            RecordLoadMultiAsyncTest();

            DataController dc = new DataController();
            dc.Request = new HttpRequestMessage();
            dc.Configuration = new HttpConfiguration();

            DateTime currentTime = DateTime.Now;

            var defaultGet = dc.GetAcync("Server3");

            Assert.IsTrue(defaultGet != null);
        }
Ejemplo n.º 2
0
        public void RecordLoadTestAsync()
        {
            DataController dc = new DataController();
            dc.Request = new HttpRequestMessage();
            dc.Configuration = new HttpConfiguration();

            DateTime currenTime = DateTime.Now;
            Data data = new Data() { ServerName = "Server1", CpuLoad = 3, RamLoad = 4, Time = currenTime };

            var reponse = dc.RecordLoadAsync(data);

            var defaultGet = dc.GetAcync("Server1");

            Assert.Inconclusive();
        }