예제 #1
0
        public async Task InfluxDB_CanGetDataBase()
        {
            InfluxLibrary influx = new InfluxLibrary("http://134.209.204.150:8086", "SimulatorUser", "2k6qzXbefhvtVsYEojztgkQ7UZqVk2UbmQmTgM2CauGfqDtTCcQLFKrcxYk3s36L");

            List <string> database = await influx.GetDatabasesAsync();

            Assert.IsTrue(database.Count == 4);
        }
예제 #2
0
        public async Task Check_If_dataBase_GetConnection_Error_Ip_Address()
        {
            InfluxLibrary influx = new InfluxLibrary("http://134.209.204.150:808", "SimulatorUser", "2k6qzXbefhvtVsYEojztgkQ7UZqVk2UbmQmTgM2CauGfqDtTCcQLFKrcxYk3s36L");

            await Assert.ThrowsExceptionAsync <ServiceUnavailableException>(() => influx.GetDatabasesAsync());
        }
예제 #3
0
        public async Task Check_If_dataBase_GetConnection_Error_Username_Password()
        {
            InfluxLibrary influx = new InfluxLibrary("http://134.209.204.150:8086", "SimulatorUser", "2k6qzXbefhvtVsYEojztgkQ7UZqVk2UbmQmTgM2CauGfqDtTCcQLFKrcxYk3s36");

            await Assert.ThrowsExceptionAsync <System.UnauthorizedAccessException>(() => influx.GetDatabasesAsync());
        }