예제 #1
0
        public WebServerMockGenerator MockWebServerCreateWithWebSiteProvidedRemoteTrue()
        {
            TestEasyConfig.Instance.WebServer.StartupTimeout = 100000;
            EnvironmentSystem.Setup(m => m.MachineName).Returns(MockMachineName);

            return(this);
        }
예제 #2
0
        public CoreMockGenerator MockGetMsBuildPathProgramFilesMsbuild()
        {
            EnvironmentSystem.Setup(f => f.ExpandEnvironmentVariables(@"%ProgramFiles%\MSBuild\12.0\bin\msbuild.exe")).Returns(MockProgramFilesMsbuilPath);
            EnvironmentSystem.Setup(f => f.ExpandEnvironmentVariables(@"%SystemDrive%\Windows\Microsoft.NET\Framework\v4.0.30319\msbuild.exe")).Returns(MockDotNetMsbuilPath);
            FileSystem.Setup(f => f.FileExists(MockProgramFilesMsbuilPath)).Returns(true);

            return(this);
        }
예제 #3
0
        public WebServerMockGenerator MockWebServerIisExpressCtor_LocateIisExpress_ProgramFiles()
        {
            EnvironmentSystem.Setup(f => f.ExpandEnvironmentVariables(@"%PROGRAMFILES%\IIS Express\iisexpress.exe")).Returns(MockIisExpressPath);
            FileSystem.Setup(f => f.FileExists(MockIisExpressPath)).Returns(true);
            FileSystem.Setup(f => f.FileGetVersion(MockIisExpressPath)).Returns(new Version("11.0"));

            return(this);
        }
예제 #4
0
 private void CreateSystem()
 {
     environmentSystem = new EnvironmentSystem(); //环境
     roleSystem        = new RoleSystem();        //角色系统
     aISystem          = new AISystem();          //AI
     eventSystem       = new EventSystem();       //事件系统
     functionSystem    = new FunctionSystem();    //功能系统
     uISystem          = new UISystem();          //UI系统
     inputSystem       = new InputSystem();       //输入系统
     gameDataSystem    = new GameDataSystem();    //游戏数据系统
 }
예제 #5
0
        public WebServerMockGenerator MockWebServerIisCtor_InetInfoFileDoesNotExist_OSVersion(string osVersion)
        {
            EnvironmentSystem.Setup(f => f.ExpandEnvironmentVariables(@"%SystemDrive%\inetpub\wwwroot")).Returns(MockWwwRootPath);
            EnvironmentSystem.Setup(f => f.ExpandEnvironmentVariables(@"%windir%\Sysnative\inetsrv\inetinfo.exe")).Returns(MockInetInfoPath);
            FileSystem.Setup(f => f.FileExists(MockInetInfoPath)).Returns(false);
            EnvironmentSystem.Setup(f => f.OSVersion).Returns(new Version(osVersion));
            EnvironmentSystem.Setup(f => f.ExpandEnvironmentVariables(@"%SystemDrive%\Windows\System32\inetsrv\config\applicationHost.config")).Returns(MockApplicationHostConfig);
            ServerManagerProvider.Setup(f => f.GetServerManager("")).Returns(ServerManager);

            return(this);
        }
예제 #6
0
        public WebServerMockGenerator MockWebServerIisExpressCtor_GetNextAvailablePort()
        {
            EnvironmentSystem.Setup(f => f.GetNextAvailablePort(0)).Returns(1000);

            return(this);
        }