public override void SetUp()
        {
            base.SetUp();

            mock = new Mock <IObjectService>();
            mock.Setup(os => os.ApplicationModel).Returns(GetApplicationModel);
            mock.Setup(os => os.Get(It.IsAny <ReferenceData>())).Returns((ReferenceData id) => objectDictionary[id]);

            invoker = new TDoInvoker();
        }
        public override void SetUp()
        {
            base.SetUp();

            codingStyle
            .ValueExtractor.Set(c => c.ValueByProperty(m => m.Returns <string>("Title")))
            .Locator.SetDefault(type.of <BusinessInputData>())
            .Locator.SetDefault(type.of <BusinessMasterInputData>())
            ;

            businessMock = new Mock <IBusinessOperation>();
            businessObj  = new BusinessOperation(businessMock.Object);

            invoker = new TDoInvoker();
        }
Пример #3
0
        public override void SetUp()
        {
            base.SetUp();

            serializer = new JsonSerializerAdapter();
            config     = BuildRoutine.ServiceClientConfig().FromBasic()
                         .ServiceUrlBase.Set(URL_BASE)
            ;
            mock    = new Mock <IRestClient>();
            testing = new RestClientObjectService(config, mock.Object, serializer);
            stubber = new TRestClientStubber();
            invoker = new TDoInvoker();

            mock.Setup(rc => rc.Get($"{URL_BASE}/ApplicationModel", It.IsAny <RestRequest>()))
            .Returns(() => new RestResponse(serializer.Serialize(GetApplicationModel())));
        }