Inheritance: IVocabularyService
Esempio n. 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);
        }
Esempio n. 2
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);
        }