コード例 #1
0
        public void SetUp()
        {
            this.buildServerMock      = MockRepository.GenerateMock <IBuildServer>();
            this.buildDetailSpecMock  = MockRepository.GenerateMock <IBuildDetailSpec>();
            this.buildQueryResultMock = MockRepository.GenerateMock <IBuildQueryResult>();

            this.communicator             = new BuildCommunicator("http://www.tfs.com");
            this.communicator.buildServer = buildServerMock;
        }
コード例 #2
0
        private static void GetBuildInfo(BuildCommunicator communicator)
        {
            Console.WriteLine("Getting TFS Build info for all projects...");
            BuildStatus info = communicator.GetBuildInformation();

            CleanBuildStatusFile();
            WriteBuildStatusToFile(info);

            Console.WriteLine("Written build info to buildstatus.json. [waiting...] ");
            Thread.Sleep(20000);
        }
コード例 #3
0
        private static void Main(string[] args)
        {
            Console.WriteLine("TFS Build status; connecting...");
            BuildCommunicator communicator = new BuildCommunicator(ConfigurationManager.AppSettings["tfsServer"]);

            while (true)
            {
                try
                {
                    GetBuildInfo(communicator);
                }
                catch (Exception e)
                {
                    Console.WriteLine("Whoops, something went wrong: " + e.Message);
                    Console.WriteLine("Don't worry, we'll retry...");
                }
            }
        }