Esempio n. 1
0
        /// <summary>
        /// Gets this instance.
        /// </summary>
        /// <returns></returns>
        public static Mock <IImport> Get()
        {
            var MockImport = new Mock <IImport>();

            MockImport.Setup(x => x.FromJson(It.IsAny <string>())).Returns(MockDataFactory.GetExampleJObject());
            MockImport.Setup(x => x.FromJsonAsync(It.IsAny <string>(), It.IsAny <CancellationToken>())).Returns(Task.FromResult(MockDataFactory.GetExampleJObject()));
            return(MockImport);
        }
Esempio n. 2
0
        /// <summary>
        /// Gets this instance.
        /// </summary>
        /// <returns></returns>
        public static Mock <IFindPersonController> Get()
        {
            var MockFindPersonController = new Mock <IFindPersonController>();

            //Config Mock
            MockFindPersonController.Setup(x => x.GetFindPerson(It.IsAny <Models.Domain.Api.Request.Person>())).Returns((Models.Domain.Api.Request.Person p) => Task.FromResult(MockDataFactory.GetApiResponse(p)));
            return(MockFindPersonController);
        }