public StatLightConfiguration(ClientTestRunConfiguration clientConfig, ServerTestRunConfiguration serverConfig)
        {
            if (clientConfig == null) throw new ArgumentNullException("clientConfig");
            if (serverConfig == null) throw new ArgumentNullException("serverConfig");

            Client = clientConfig;
            Server = serverConfig;
        }
        public StatLightConfiguration(ClientTestRunConfiguration clientConfig, ServerTestRunConfiguration serverConfig)
        {
            if (clientConfig == null)
            {
                throw new ArgumentNullException("clientConfig");
            }
            if (serverConfig == null)
            {
                throw new ArgumentNullException("serverConfig");
            }

            Client = clientConfig;
            Server = serverConfig;
        }
 private ServerTestRunConfiguration GetDummyServerTestRunConfiguration()
 {
     var config = new ServerTestRunConfiguration(xapHost: () => _hostXap,
                                                            xapToTest: "",
                                                            xapHostType: XapHostType.MSTest2010April,
                                                            queryString: "foo",
                                                            forceBrowserStart: false,
                                                            windowGeometry: new WindowGeometry(),
                                                            isPhoneRun: false
                                                            );
     return config;
 }
Exemple #4
0
        protected override void Before_all_tests()
        {
            base.Before_all_tests();

            _pathToTempXapFile = Path.GetTempFileName();

            Func<byte[]> xapToTestFactory = () => File.ReadAllBytes(_pathToTempXapFile);

            using (var writer = File.CreateText(_pathToTempXapFile))
            {
                writer.Close();
            }
            var mockXapHostFileLoaderFactory = new Mock<XapHostFileLoaderFactory>(TestLogger);
            mockXapHostFileLoaderFactory
                .Setup(s => s.LoadXapHostFor(It.IsAny<XapHostType>()))
                .Returns(new byte[] { 0, 1, 1, 2, 3, 1, });
            _mockServerTestRunConfiguration = new ServerTestRunConfiguration(() => new byte[] { 1, 2 }, 500, _pathToTempXapFile, XapHostType.MSTestNovember2009, "", true, false);

            Assert.IsTrue(File.Exists(_pathToTempXapFile));
        }