GetLocator() публичный Метод

public GetLocator ( ) : string
Результат string
Пример #1
0
        public List<Change> GetChanges(Action<IChangesHavingBuilder> having, Action<IChangesIncludeBuilder> include)
        {
            var changesHavingBuilder = new ChangesHavingBuilder(m_BuildHavingBuilderFactory);
            having(changesHavingBuilder);
            var changesIncludeBuilder = new ChangesIncludeBuilder();
            include(changesIncludeBuilder);
            var columns = changesIncludeBuilder.GetColumns();
            var locator = changesHavingBuilder.GetLocator();

            return m_TeamCityCaller.GetFormat<ChangesList>(@"/app/rest/changes?locator={0}&fields=change({1})", locator, columns).Change;
        }
        public void Build()
        {
            // Arrange
            var buildHavingBuilder = A.Fake<BuildHavingBuilder>();
            A.CallTo(() => buildHavingBuilder.GetLocator()).Returns("id:123");

            var buildHavingBuilderFactory = A.Fake<IBuildHavingBuilderFactory>();
            A.CallTo(() => buildHavingBuilderFactory.CreateBuildHavingBuilder()).Returns(buildHavingBuilder);

            var changesHavingBuilder = new ChangesHavingBuilder(buildHavingBuilderFactory);

            // Act
            changesHavingBuilder.Build(_ => _.Id(123));
            var locator = changesHavingBuilder.GetLocator();

            // Assertions
            locator.Should().Be("build:id:123");
        }