public ReportServer() { // ToDo : Handles Log Settings Logger.IsLogActivated = true; Logger.MinimalSeverity = Logger.MessageSeverity.Debug; string databasePath = Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData); databasePath = System.IO.Path.Combine(databasePath, "PstBackup", "PstBackup.mdf"); Logger.Write(1, $"Démarrage de ReportServer. Database at {databasePath}", Logger.MessageSeverity.Information); _reportServerDb = new ReportServerDb(databasePath); _reportServerDb.Connect(); }
public void DeleteClient_WhenClientExists() { // Arrange SUT sut = new SUT(_dbPath); sut.Connect(); Client clientToDelete = new Client() { Id = Guid.NewGuid().ToString(), Version = new Version("1.0.1705.26"), Username = "******", ComputerName = "Céos", LastContactDate = DateTime.Now.ToUniversalTime() }; // Act sut.RegisterClient(clientToDelete); Assert.IsTrue(sut.IsClientExists(clientToDelete)); sut.DeleteClient(clientToDelete); // Assert Assert.IsFalse(sut.IsClientExists(clientToDelete)); }