public void UnprotectedDatabase() { const string status = @" Warning: CM Synergy startup failed. "; Synergy synergy = (Synergy)NetReflector.Read(SynergyMother.ConfigValues); SynergyCommand command = new SynergyCommand(synergy.Connection, synergy.Project); Assert.IsFalse(command.IsDatabaseProtected(status, synergy.Connection.Host, synergy.Connection.Database)); }
public void ProtectedDatabase() { const string status = @" Warning: Database \\myserver\share\mydatabase on host myserver is protected. Starting a session is not allowed. Warning: CM Synergy startup failed. "; Synergy synergy = (Synergy)NetReflector.Read(SynergyMother.ConfigValues); SynergyCommand command = new SynergyCommand(synergy.Connection, synergy.Project); Assert.IsTrue(command.IsDatabaseProtected(status, synergy.Connection.Host, synergy.Connection.Database)); }