Beispiel #1
0
        private void OverrideMatchId(Match match)
        {
            var hardcodedMatchProvider = new HardcodedMatchProvider(null);

            hardcodedMatchProvider.SetMatchId(match.MatchId);
            _container.Register(
                Component.For <CurrentMatchProvider>()
                .Instance(hardcodedMatchProvider)
                .Named(Guid.NewGuid().ToString())
                .IsDefault());
        }
Beispiel #2
0
        public void Export()
        {
            _container = RestApiApplication.CreateContainer();

            var hardcodedMatchProvider = new HardcodedMatchProvider(null);

            hardcodedMatchProvider.SetMatchId(new Guid("4A82121D-71A6-45AE-AFD8-41574086B55C"));

            _container.Register(
                Component.For <CurrentMatchProvider>()
                .Instance(hardcodedMatchProvider)
                .Named(Guid.NewGuid().ToString())
                .IsDefault());

            var service = _container.Resolve <KmlExport>();

            var kml = service.GetKml();

            File.WriteAllText(@"c:\temp\bbr2015.kml", kml);

            Assert.IsNotNullOrEmpty(kml);
        }