Exemple #1
0
        public override void SaveEntity_EntityExists_EntityIsUpdated()
        {
            var description = RandomUtil.GetRandomAlphaNumericString(25);
            var title       = TitleCommands.SaveTitle(new Title {
                Description = description
            }, Context);
            var newDescription = RandomUtil.GetRandomAlphaNumericString(30);

            title.Description = newDescription;
            title.SaveTitle(Context);

            var titleDb = TitleQueries.GetTitleById(Context, title.IdTitle);

            Assert.AreNotEqual(description, titleDb.Description);
            Assert.AreEqual(newDescription, titleDb.Description);
        }
        public void GetRandomAlphaNumericStringTest_LengthIsGiven_ReturnsStringWithMatchingLenght()
        {
            var length = RandomUtil.GetRandomNumber(2);

            TestReturnedStringValue(RandomUtil.GetRandomAlphaNumericString(length), length);
        }
 public void GetRandomAlphaNumericStringTest_NoLengthGiven_Returns10DigitString()
 {
     TestReturnedStringValue(RandomUtil.GetRandomAlphaNumericString(), 10);
 }