public void SetUp()
        {
            theDictionary = new Dictionary<string, string>();
            theInnerData = new InMemoryRequestData();

            theSubstitutedData = new SubstitutedRequestData(theInnerData, new DictionaryKeyValues(theDictionary));
        }
Пример #2
0
 public void SetUp()
 {
     theFubuRequest  = new InMemoryFubuRequest();
     theData         = new InMemoryRequestData();
     objectConverter = new ObjectConverter();
     theRequest      = new FubuSmartRequest(theData, objectConverter, theFubuRequest);
 }
        public void SetUp()
        {
            requestData = new InMemoryRequestData();

            container = DatabaseDriver.GetFullFastPackContainer();
            container.Configure(x =>
            {
                x.UseOnDemandNHibernateTransactionBoundary();
                x.For<IRequestData>().Use(requestData);
            });
        }
        public void SetUp()
        {
            theDictionary = new Dictionary<string, string>();
            theInnerData = new InMemoryRequestData();

            //inner / substitutions
            theSubstitutedData = new SubstitutedRequestData(theInnerData, new DictionaryKeyValues(theDictionary));

            theDictionary.Add("val", "value");
            theDictionary.Add("setting", "setting-{val}");
            theInnerData["Key"] = "*{setting}*";
        }
        public void find_enumerable_request_data_from_parent()
        {
            var requestData = new InMemoryRequestData();
            requestData.ReadData(@"
            Name=Jeremy
            Age=38
            List[0]Name=Max
            List[0]Hometown=Austin
            List[1]Name=Natalie
            List[1]Hometown=Bentonville
            List[2]Name=Nadine
            List[2]Hometown=Jasper
            List[3]Hometown=Montrose
            ");

            var elements = EnumerateFlatRequestData.For(requestData, "List");
            elements.Count().ShouldEqual(4);
            elements.Select(x => x.Value("Hometown"))
                .ShouldHaveTheSameElementsAs("Austin", "Bentonville", "Jasper", "Montrose");
        }
        public void SetUp()
        {
            var theHttpRequest = MockRepository.GenerateMock<ICurrentChain>();
            theHttpRequest.Stub(x => x.ResourceHash()).Return("something/else");

            var locator = new StructureMapServiceLocator(new Container(x =>
            {
                x.For<ICurrentChain>().Use(theHttpRequest);
            }));

            FubuApplication.SetupNamingStrategyForHttpHeaders();

            var data = new InMemoryRequestData();
            data["If-None-Match"] = "12345";

            var context = new BindingContext(data, locator, new NulloBindingLogger());

            var binder = StandardModelBinder.Basic();

            theEtagRequest =  binder.Bind(typeof(ETaggedRequest), context).As<ETaggedRequest>();
        }
        public void SetUp()
        {
            inMemoryServiceLocator = new InMemoryServiceLocator();

            _binder = new EditEntityModelBinder(new NulloEntityDefaults());

            theGuid = Guid.NewGuid();

            theData = new InMemoryRequestData();
            theData["BobName"] = "Ryan";
            theData["Flavor"] = "choco";
            theData["Id"] = theGuid.ToString();

            cl = new ConverterLibrary();

            oc = new ObjectConverter(inMemoryServiceLocator, cl);

            inMemoryServiceLocator.Add<IObjectConverter>(oc);

            inMemoryServiceLocator.Add<IObjectResolver>(ObjectResolver.Basic());
        }
Пример #8
0
 public void SetUp()
 {
     theData = new InMemoryRequestData();
     objectConverter = new ObjectConverter();
     theRequest = new SmartRequest(theData, objectConverter);
 }
Пример #9
0
 public void SetUp()
 {
     theData = new InMemoryRequestData();
     theLibrary = new ConverterLibrary();
     objectConverter = new ObjectConverter(new InMemoryServiceLocator(), theLibrary);
     theRequest = new SmartRequest(theData, objectConverter);
 }
Пример #10
0
 public void SetUp()
 {
     theFubuRequest = new InMemoryFubuRequest();
     theData = new InMemoryRequestData();
     objectConverter = new ObjectConverter();
     theRequest = new FubuSmartRequest(theData, objectConverter, theFubuRequest);
 }
 public void SetUp()
 {
     data = new InMemoryRequestData();
     detector = new DebugDetector(data);
 }
 private InMemoryStructureMapBindingContext(InMemoryRequestData data, IContainer container)
     : base(data, new StructureMapServiceLocator(container))
 {
     _data = data;
     _container = container;
 }
Пример #13
0
 public void SetUp()
 {
     _calledUpon = MockRepository.GenerateStub<ICalledUpon>();
     _data = new InMemoryRequestData();
     _calledUpon.Stub(c => c.Action());
 }