コード例 #1
0
        public async void NextChainId_Update_Valid_Reference()
        {
            Mock <IClaspRepository> claspRepository = new Mock <IClaspRepository>();

            claspRepository.Setup(x => x.ChainByNextChainId(It.IsAny <int>())).Returns(Task.FromResult <Chain>(new Chain()));

            var validator = new ApiClaspServerRequestModelValidator(claspRepository.Object);
            await validator.ValidateUpdateAsync(default(int), new ApiClaspServerRequestModel());

            validator.ShouldNotHaveValidationErrorFor(x => x.NextChainId, 1);
        }