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); }
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()); }
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()); }