public async Task GetDoorbotsHistoryTest() { var session = new Api.Session(Username, Password); await session.Authenticate(); var doorbotHistory = await session.GetDoorbotsHistory(); Assert.IsTrue(doorbotHistory.Count > 0, "No doorbot history items returned"); }
public async Task GetDoorbotsHistoryTest() { if (!IsSessionActive()) { return; } var doorbotHistory = await session.GetDoorbotsHistory(); Assert.IsTrue(doorbotHistory.Count > 0, "No doorbot history items returned"); Assert.IsTrue(doorbotHistory.Count == 20, $"{doorbotHistory.Count} doorbot history items returned while 20 were expected"); }
public async Task GetDoorbotsHistoryWithLimitTest() { var limit = 50; var session = new Api.Session(Username, Password); await session.Authenticate(); var doorbotHistory = await session.GetDoorbotsHistory(limit); Assert.IsTrue(doorbotHistory.Count > 0, "No doorbot history items returned"); Assert.IsTrue(doorbotHistory.Count == limit, $"{doorbotHistory.Count} doorbot history items returned while {limit} were expected"); }
public async Task GetDoorbotsHistoryRecordingByInstanceTest() { var session = new Api.Session(Username, Password); await session.Authenticate(); var doorbotHistory = await session.GetDoorbotsHistory(); Assert.IsTrue(doorbotHistory.Count > 0, "No doorbot history events were found"); var tempFilePath = Path.GetTempFileName(); await session.GetDoorbotHistoryRecording(doorbotHistory[0], tempFilePath); File.Delete(tempFilePath); }