public void Init() { ObjectFactory.Initialize(x => x.AddRegistry<TfsRegistry>()); ObjectFactory.Configure( x => x.For<TransportMock>().Use(TransportMock.CreateWithoutStructureMapClear( typeof (TfsPluginProfile).Assembly, new List<Assembly> {typeof (Command).Assembly}))); _testRepository = new TfsTestRepository(); _tfsRepoUri = _testRepository.Uri.ToString(); _profile = ObjectFactory.GetInstance<TransportMock>().AddProfile( "Profile", new TfsPluginProfile { Uri = _tfsRepoUri, Login = _testRepository.Login, Password = _testRepository.Password, StartRevision = "1" }); }
private int GetValidRevision(TfsTestRepository repository) { string maxChangeSetId = _testRepository.GetLatestRevision(); int revisionValue; if (int.Parse(maxChangeSetId) >= ConfigHelper.Instance.PageSize) revisionValue = int.Parse(maxChangeSetId) - ConfigHelper.Instance.PageSize/2; else revisionValue = int.Parse(maxChangeSetId)/2; return revisionValue; }