public void BeforeEachTest()
		{
			_projectOne = new ProjectModel("proj-1", "Project One", "Subtitle One", 1, BuildServiceProvider.AppVeyor);
			_projectTwo = new ProjectModel("proj-2", "Project Two", "Subtitle Two", 2, BuildServiceProvider.TeamCity);
			_jsonOne = JsonSerializer.SerializeObject(ConfigHashifier.Hashify(_projectOne));

			_readBody = new FakeApiReadBody();
			_socket = new Mock<IApiSocket>();
			_config = new Mock<IConfigurationService>();
			_garbage = new Mock<IGarbage>();

			_req = new ApiRequest
				{
					Headers = new Hashtable(),
					GetArguments = new Hashtable(),
					Body = _readBody,
					HttpMethod = "GET",
					Url = "projects/",
					Client = _socket.Object,
				};
			_sut = new ConfigApiService(_config.Object, _garbage.Object);
		}
示例#2
0
        public void BeforeEachTest()
        {
            _projectOne = new ProjectModel("proj-1", "Project One", "Subtitle One", 1, BuildServiceProvider.AppVeyor);
            _projectTwo = new ProjectModel("proj-2", "Project Two", "Subtitle Two", 2, BuildServiceProvider.TeamCity);
            _jsonOne    = JsonSerializer.SerializeObject(ConfigHashifier.Hashify(_projectOne));

            _readBody = new FakeApiReadBody();
            _socket   = new Mock <IApiSocket>();
            _config   = new Mock <IConfigurationService>();
            _garbage  = new Mock <IGarbage>();

            _req = new ApiRequest
            {
                Headers      = new Hashtable(),
                GetArguments = new Hashtable(),
                Body         = _readBody,
                HttpMethod   = "GET",
                Url          = "projects/",
                Client       = _socket.Object,
            };
            _sut = new ConfigApiService(_config.Object, _garbage.Object);
        }