public void Worst() { var loginConnection = LoginConnectionFactory.CreateSuccessful(); var connection = loginConnection.LoginSuccessful("username", "password"); var data = connection.GetDataSuccessful(); Logger.Log(data); }
public void Bad() { var loginConnection = LoginConnectionFactory.CreateSuccessful(); if (loginConnection != null) { var connection = loginConnection.LoginSuccessful("username", "password"); if (connection != null) { var data = connection.GetDataSuccessful(); Logger.Log(!string.IsNullOrEmpty(data) ? data : "Unbehandelter Fehler"); } else { Logger.Log("Unbehandelter Fehler"); } } else { Logger.Log("Unbehandelter Fehler"); } }