Beispiel #1
0
        public async Task GetArchive_ValidParameters_SetsCorrectResourceAndMethod()
        {
            var sut = new RepositoryRepository(_requestFactory);

            await sut.GetArchive(0);

            _requestFactory.Received().Create("projects/{projectId}/repository/archive", Method.Get);
        }
Beispiel #2
0
        public async Task GetArchive_ValidParameters_AddsProjectIdUrlSegment()
        {
            const uint expected = 0;
            var        sut      = new RepositoryRepository(_requestFactory);

            await sut.GetArchive(expected);

            _request.Received().AddUrlSegment("projectId", expected);
        }
Beispiel #3
0
        public async Task GetArchive_ShaIsSet_AddsShaParameter()
        {
            const string expected = "sha";
            var          sut      = new RepositoryRepository(_requestFactory);

            await sut.GetArchive(0, expected);

            _request.Received().AddParameterIfNotNull("sha", expected);
        }