Inheritance: IVocabularyService
コード例 #1
0
        public void Init()
        {
            database = new Mock <IDocumentSession>();
            //mock existing vocab test
            database.Setup(x => x.Load <Vocabulary>()).Returns <Vocabulary>(null);

            validator = new Mock <IVocabularyValidator>();
            validator.Setup(x => x.Validate(It.IsAny <Vocabulary>())).Returns(new ValidationResult <Vocabulary>());

            service = new VocabularyService(database.Object, validator.Object);
        }
コード例 #2
0
ファイル: VocabularyService.cs プロジェクト: jncc/topcat
        public void Init()
        {
            database = new Mock<IDocumentSession>();
            //mock existing vocab test
            database.Setup(x => x.Load<Vocabulary>()).Returns<Vocabulary>(null);

            validator = new Mock<IVocabularyValidator>();
            validator.Setup(x => x.Validate(It.IsAny<Vocabulary>())).Returns(new ValidationResult<Vocabulary>());

            service = new VocabularyService(database.Object, validator.Object);
        }