public void Verb_WhenVerbSpecified_ThenReturnVerb() { //ARRANGE const string verbToCheck = "Kommen"; var mockedArticleFactory = new Mock<IArticleFactory>(); var derDieDas = new DerDieDasData("DER, " + verbToCheck + ", kommen", mockedArticleFactory.Object); //ACT var verb = derDieDas.Verb; //ASSERT Assert.Equal(verbToCheck, verb); }
public void ValidateArticle_WhenArticleIsIncorrect_ThenReturnsFalse() { //ARRANGE var mockedArticleFactory = new Mock<IArticleFactory>(); mockedArticleFactory.Setup(x => x.CreateArticle("DAS")).Returns(new DasArticle()); var derDieDas = new DerDieDasData("DAS, Kommen, Kommen", mockedArticleFactory.Object); //ACT var validates = derDieDas.ValidateArticle(new DerArticle()); //ASSERT Assert.False(validates); }
public void ValidatePlural_WhenPluralVerbIsCorrect_ThenReturnsTrue() { //ARRANGE var mockedArticleFactory = new Mock<IArticleFactory>(); var derDieDas = new DerDieDasData("DAS, Kommen, Kommen", mockedArticleFactory.Object); //ACT var validates = derDieDas.ValidatePlural("Kommen"); //ASSERT Assert.True(validates); }
public void ValidateArticleWithString_WhenArticleIsCorrect_ThenReturnsTrue() { //ARRANGE var mockedArticleFactory = new Mock<IArticleFactory>(); mockedArticleFactory.Setup(x => x.CreateArticle("DER")).Returns(new DerArticle()); var derDieDas = new DerDieDasData("DER, Kommen, Kommen", mockedArticleFactory.Object); //ACT var validates = derDieDas.ValidateArticle("der"); //ASSERT Assert.True(validates); }