Exemple #1
0
        public void Execute_Less_Params_ThrowEx()
        {
            var fakeProvider = new FakeTeamProvider();
            var listParams   = new List <string>();

            var sut = new CreateTeamCommand(listParams, fakeProvider);

            //Act & Assert
            Assert.ThrowsException <ArgumentException>(() => sut.Execute(), "Parameters count is not valid!");
        }
Exemple #2
0
        public void ThrowWhen_NoOtherTeams()
        {
            //Arrange
            var fakeProvider = new FakeTeamProvider();
            var list         = new List <string>();
            var sut          = new CreateTeamCommand(list, fakeProvider);

            //Act & Assert
            Assert.ThrowsException <ArgumentException>(() => sut.Execute());
        }
Exemple #3
0
        public void ReturnCorrectString()
        {
            //Arrange
            var fakeProvider = new FakeTeamProvider();
            var listParams   = new List <string>()
            {
                "Ducks"
            };

            var sut = new CreateTeamCommand(listParams, fakeProvider);

            //Act
            var result = sut.Execute();

            //Assert
            Assert.AreEqual(result, $"Created Team{Environment.NewLine}Ducks" + Commons.CreateTeamText());
        }