예제 #1
0
 public void SetUp()
 {
     Console.WriteLine("Setup start");
     skype = Substitute.For <ISkypeAdapter>();
     tc    = Substitute.For <ITeamCityClient>();
     chat  = Substitute.For <IChat>();
     skype.GetChat("").ReturnsForAnyArgs(chat);
     bot           = new TeamCityBot.TeamCityBot();
     botParameters = new BotParameters
     {
         PublishChatName = "test",
         Branches        = new[] { "dev" }
     };
     builds = new FakeBuilds();
     tc.Builds.Returns(builds);
     Console.WriteLine("Setup finish");
 }
        public void SetUp()
        {
            Console.WriteLine("Setup start");
            tc     = Substitute.For <ITeamCityClient>();
            builds = new FakeBuilds();
            tc.Builds.Returns(builds);

            testOccurrences = new FakeTestOccurrences();
            tc.TestOccurrences.Returns(testOccurrences);

            _formatter = new BuildResultFormatter();

            _sendMessages      = new List <string>();
            _sendMessageAction = result => _sendMessages.Add(_formatter.Format(result));

            Console.WriteLine("Setup finish");
        }