public void IsController(TfsBuilderController sut)
 {
     Assert.IsAssignableFrom<Controller>(sut);
 }
 public void BuildWithNullBuildParametersThrows(
     TfsBuilderController sut,
     string payload)
 {
     var e = Assert.Throws<ArgumentNullException>(() => sut.Build(null));
     Assert.Equal("parameters", e.ParamName);
 }
        public void GetsBuildCommand(TfsBuilderController sut)
        {
            var actual = sut.BuildCommand;

            Assert.IsType<TfsBuildCommand>(actual);
        }
        public void BuildWithInvalidBuildParametersShowsErrorMessages(
            TfsBuilderController sut,
            BuildParameters parameters,
            string expected1,
            string expected2)
        {
            // Arrange
            sut.ModelState.AddModelError("dummy1", expected1);
            sut.ModelState.AddModelError("dummy2", expected2);

            // Act
            var actual = sut.Build(parameters);

            // Assert
            var contentResult = Assert.IsType<ContentResult>(actual);
            Assert.Contains(expected1, contentResult.Content);
            Assert.Contains(expected2, contentResult.Content);
        }