public void testQuery() { TFSAccessor t = TFSAccessor.TFSAccessorFactory("", "", "", ""); WorkItemCollection wic = t.GetReleaseNotesFromQuery(); Assert.IsNotNull(wic); }
/// <summary> /// Factory pattern interface for creating a TfsAccessor. /// Catches errors relates to creating the interface (ie. authentication issues) /// </summary> /// <returns>A TfsAccessor</returns> public static TFSAccessor TFSAccessorFactory(string serverTeamProjectUrl, string projectName, string iterationNumber, string projectSubpath = "") { var errorLogger = (new Logger()) .SetMessage("Connected to TFS") .SetLoggingType(Logger.Type.Information); try { TFSAccessor a = new TFSAccessor(serverTeamProjectUrl, projectName, iterationNumber, projectSubpath); if (a != null) { errorLogger.Display(); } return(a); } catch (Exception e) { errorLogger.SetMessage(e.Message).SetLoggingType(Logger.Type.Error).Display(); return(null); } }
public void testConnection() { TFSAccessor t = TFSAccessor.TFSAccessorFactory("", "", "", ""); Assert.IsNotNull(t); }
/// <summary> /// Factory pattern interface for creating a TfsAccessor. /// Catches errors relates to creating the interface (ie. authentication issues) /// </summary> /// <returns>A TfsAccessor</returns> public static TFSAccessor TFSAccessorFactory(string serverTeamProjectUrl, string projectName, string iterationNumber, string projectSubpath = "") { var errorLogger = (new Logger()) .SetMessage("Connected to TFS") .SetLoggingType(Logger.Type.Information); try { TFSAccessor a = new TFSAccessor(serverTeamProjectUrl, projectName, iterationNumber, projectSubpath); if (a != null) errorLogger.Display(); return a; } catch (Exception e) { errorLogger.SetMessage(e.Message).SetLoggingType(Logger.Type.Error).Display(); return null; } }