예제 #1
0
        public void ClothingItemImageValidatorTests_CorrectInput_IsValid()
        {
            var testEntity = new ClothingItemImage();

            testEntity.ClothingItemId = Guid.NewGuid();
            testEntity.ImageId        = Guid.NewGuid();

            var result = testEntity.Validate();

            Assert.AreEqual(true, result.IsValid());
        }
예제 #2
0
        public void ClothingItemImageValidatorTests_InvalidInput_ContainsErrors()
        {
            var testEntity = new ClothingItemImage();

            var result = testEntity.Validate() as DictionaryValidationResult;

            Assert.AreEqual(false, result.IsValid());
            Assert.AreEqual(true, result.ContainsKey(V.ClothingItemImage_ClothingItemId));
            Assert.AreEqual(true, result.ContainsKey(V.ClothingItemImage_ImageId));

            Console.WriteLine(result.GetValidationResult());
        }