Commit Graph

51 Commits

Author SHA1 Message Date
Tom Longhurst
cd1835326b Fix xUnit Warnings (#2906)
* Fix xUnit Warnings

* Fix

* Fix formatting in AsyncPaginationExtensionGenerator.cs

---------

Co-authored-by: Keegan Campbell <me@kfcampbell.com>
2024-04-15 13:19:26 -07:00
Heath Stewart
8ba882e98d Add StateReason to IssueUpdate (#2665)
Fixes #2664

Co-authored-by: Nick Floyd <139819+nickfloyd@users.noreply.github.com>
2023-02-21 16:03:20 -06:00
notauserx
595e35d641 add active lock reason to PR (#2543)
* add active lock reason to PR

* update docs

* refactor: extract lock and unlock from IIssuesClient
create ILockUnlockClient so both IIssuesClient and IPullRequestClient can
access lock and unlock methods.

* refactor LockUnlock for reactive clients

* Update doc to include lock unlock sample code

* Use Assert.Null to check null value in test

Co-authored-by: notauserx <notauserx@users.noreply.github.com>
2022-08-19 18:36:47 +01:00
notauserx
536e5c3737 feat: adds active lock reason to issue (#2525) 2022-08-05 16:44:17 -05:00
Chris Simpson
5fe3ea82f0 tests: Updates and fixes for tests, changing master to main and adding flaky tests marker (#2511) 2022-07-25 10:36:09 -05:00
Brendan Forster
45bc5eced7 autofix tests based on feedback from xunit analyzers (#1997) 2019-09-16 19:46:40 -03:00
Mickaël Derriey
73feecefb3 Change response models 'Url' properties from Uri to string (#1585)
* Add convention test to ensure 'Url' properties are of type string

Closes #1582

* Change 'Url' properties from Uri to string

Global Find/Replace FTW!

* fix compilation errors in the integration tests project

* Extend 'Url' properties type check to request models

* Stick to convention tests naming convention

* Remove unused using directives in models

Changing from `Uri` to `string` means the `using System;`
directive was not needed anymore in some files

* Update exception message wording

* empty commit to trigger a new build - hopefully Travis passes

* add convention test to ensure request models have Uri 'Url' properties

* make request models 'Url' properties Uri

fix typo in convention test name

* revert some request models 'Url' properties as `string`

see https://github.com/octokit/octokit.net/pull/1585#issuecomment-297186728

* Change test so that all model types must have 'Url' properties of type string

 - Filter test input to only get types which have 'Url' properties
 - Merge response and request model types tests into one
 - Unparameterize the exception since we only check for the string type now

* Fix string.Format tokens

If this PR doesn't get rebased, it'll be my wall of shame FOREVER!

* and then it's even more embarrassing when the commit message says rebased but you really meant squashed

* Remove exclusion of `Release` from request models
2017-04-30 22:19:39 +10:00
Ryan Gribble
3c818934b8 Release v0.24 - A Sight For Sore Eyes (#1539)
* Add release notes and bump version to 0.24

* run "build FormatCode" to fix up whitespace/formatting issues

* Fix failing Ssh key tests due to "validation exception".  This key must be in use on github (under another user, most likely from these tests failing).  Changed to a new SSH key and tweaked tests to reduce chance of a key being created and not destroyed

* Assignee and Assignees cant both be specified on NewIssue.  We missed this one in the PR.  Marked Assignee as [Obsolete] and fixed tests to use Assignees

* Fix a couple of Reactions tests that were calling the wrong client methods

* Fix timeline tests - looks like the response class has changed shape a bit, it now has an Issue object in the payload and Id field isnt present (leaving Id field there in case other timeline events do use it)

* Fix some following tests that require the test user to follow more than 1 other user

* Unskip these Event tests now because apparently they work!

* add breaking changes notes

* Update ApiErrorMessageSafe to return null for empty and whitespace strings (#1540)

* return null if ApiError.Message is empty or whitespace

* Uncomment test, which now passes

* update release notes to include PR1540

* Add "Bot" AccountType, was causing a deserialization exception when running the integration test "SearchForExcludedLanguage" (#1541)

* Update to include PR1541

* add bullets to make release notes easier to read

* markup additional code mentions in notes

* Fix grammar

fields => field
2017-01-17 18:56:55 +10:00
Martin Scholz
b4fad9bfab Add multiple assignees to issues (#1339)
* [WIP]

* add new method to add assignees for an issue

* added new overloads

* added unit tests

* fixed missed overload calls

* fixed inconsistency in tests

* added integration tests

* fixed errors in tests

* fixed all remarks

* added new overloads

* added unit tests

* added integration tests

* fixed incorrect variable names

* added new overloads

* added unit tests

* added itegration tests

* fixed integration tests

* removed extra empty lines

* fixed errors in unit tests

* added overloads on IObservableReleasesClient and IReleasesClient

* added new unit tests

* added integration tests

* added Task as return value of unit tests

* added Task as return parameter

* added return value ReleasesClientTests

* another try to get tests work

* another one try

* undo prev commit

* fixed errors in tests

* removed extra ThrowsAsync checks

* added new overloads

* added unit tests

* added integration tests

* added integration tests

* Add ApiOptions overloads to IWatchedClient + tests.

* Add ApiOptions overloads to IObservableWatchedClient + tests.

* More tests.

* fixed error in ObservableWatchedClient

* added unit tests

* added integration tests

* added new overloads

* added unit tests

* added integration tests

* renamed "Ensures" methods to deliver more consistency in code

* fixed failed tests

* Add ApiOptions overloads to methods on I(Observable)IssuesLabelsClient (#1329)

* correcting a couple of tests (#1331)

* Add ApiOption overloads to methods on I(Observable)OrganizationsClient (#1324)

* Add ApiOptions overloads to methods on I(Observable)OrganizationMembersClient (#1332)

* fix description

* add new response for IssueAssignees

* add constructor for IssueAssignees

* add debugger display for NewAssignees

* add methods for observable assignees client; new unit tests

* add observable unit tests for add method

* place AddAssignees under IssueClient

* fix description

* [WIP] add generic delete method

* revert add assignees

* add assignees key under issue client

* remove IssueAssignees dependencies

* fix type IssueAssignees

* add remove method for issue assignees; finish generic delete method

* unit tests for remove assignees

* Add Assignees property to NewIssue and UpdateIssue requets
Add Asignees property to Issue response
Removed [SerializeNull] attribute from UpdateIssue.Assignee as this was causing it to remove assignee when none was specified
Add a couple of integration tests to prove Assignees are being deserialised

* rename NewAssignees to AssignessUpdate

* change Assignees key description

* check null Issue.ToUpdate method

* add accept header for IssuesClientTests

* Fix some more unit tests

* add integration test

Check if an assignee was added to an issue

* fix merge conflicts

* resolve conflicts

* implement some hints from @ryangribble

* resolve merge fixes

* clean up

* some more changes

* create new repo

Create a new repo for integrationtest
'CanRetrieveIssuesWithMultipleAssignees()'

* fix merge

* fix conflicts

* fix xml

* change test

* change delete overloads

* Fix tests

* fix xml

* Add helper function RemoveLabel

* Add helper function RemoveAssignee

* Format last commit

* Add integration tests to exercise new Assignees field on IssueUpdate

* GitHub API doesnt allow Assignee and Assignees properties to both be specified - API docs say that Assignee is deprecated so mark it [Obsolete] and dont populate it in Issue.ToUpdate()

* Add Assignees field to PullRequest response object, and integration tests to verify it is populated.
This field is not listed in the API docs but probing the API revealed it is included in payloads

* add a couple of extra tests to verify the IssueUpdate.Labels is working correctly

* Include assignees in ctor for consistency

* fix IssueUpdate test for new Assignees field
2017-01-11 22:53:41 +10:00
Martin Scholz
72e30a7f90 Add reactions to issue, commit comment and review payload (#1405)
* add reactions to issue response payload

* add reactions to commit comment payload

* add reactions to review comment payload

* create tests for issue client

* tests for commitcomment client

* tests for pull request review comment

* change observable tests

* simplify strings

* remove unnecessary clients

* change integration tests to retrieve all reaction types

* create integration test for issue comment client

* fix merge conflicts

* fix merge conflicts

* gets tests passing again

* fix some reaction integration tests

* Fixup unit tests wth preview accepts header
Also applied preview header to a couple of repositoryId based calls that were added by another PR

* Fixup unit tests wth preview accepts header
Also applied preview header to a couple of repositoryId based calls that were added by another PR

* Rework reaction payload tests for IssueComments to handle Get, GetAllForIssue and GetAllForRepository calls

* [WIP] reaction payload tests

* Rework reaction payload tests for IssueComments to handle Get, GetAllForIssue and GetAllForRepository calls

* Rework reaction payload tests for Issues client

* Rework reaction payload tests for PullRequestReviews client

* Rework reaction payload tests for CommitComments client

* Revert "[WIP] reaction payload tests"

This reverts commit a6179b0f21a3ddfe36bfd3ae5eafae0e69b52252.
2016-07-08 20:29:08 +10:00
aedampir@gmail.com
d487553785 added integration tests 2016-06-14 19:21:23 +07:00
Brendan Forster
dfebfe31b6 Add ApiOption overloads to IIssuesClient and IObservableIssuesClient (#1274) 2016-06-02 11:21:30 +02:00
Mordechai Zuber
1b51717f8d Add repository property to Issue response model (#1292)
* Add repository property to Issue response model

Fixes #1243

* Fix typo
2016-05-18 12:13:19 +03:00
aedampir@gmail.com
f1896888c6 Redundant commas in object initializer were removed. 2016-04-22 17:30:37 +07:00
Brendan Forster
e8df9905db Merge pull request #1185 from prayankmathur/issue896
Implemented Lock/Unlock Functionality for Issues
2016-04-05 17:14:32 -04:00
Prayank Mathur
8e49f04a5d Added implementation for delete that takes custom media type header and changed definition for Unlock accordingly 2016-03-30 14:30:37 +05:30
Ryan Gribble
64550015f1 Merge pull request #1140 from prayankmathur/master
Added enum ItemStateFilter to differentiate between search and list APIs
2016-03-29 22:39:52 +10:00
Prayank Mathur
63bd1226c9 Resolved conflicts 2016-03-29 16:48:51 +05:30
Prayank Mathur
8ff574ab1c Changes in Accept headers as well as names of the functions 2016-03-29 16:19:47 +05:30
Prayank Mathur
171b3c520a Implement Lock/Unlock Issue 2016-03-25 11:51:42 +05:30
aedampir@gmail.com
bad2ac18bf Merge branch 'master' of https://github.com/octokit/octokit.net into remove-redundant-commas 2016-03-25 00:55:55 +07:00
aedampir@gmail.com
7f5d446ea8 Redundant commas in object initializers were removed. 2016-03-24 23:12:12 +07:00
aedampir@gmail.com
3ff8f5e809 Misspelling expctedUri-> expectedUri was fixed. 2016-03-23 22:36:58 +07:00
Prayank Mathur
397b1f1c82 Updated the enum ItemState with deprecating the ItemState.All and making the necessary changes 2016-03-14 23:22:18 +05:30
Prayank Mathur
0f5d7c4182 Fixed issue 1082 adding enum ItemStateFilter 2016-03-11 00:23:54 +05:30
Prayank Mathur
d03e37bf4f Issue 1082 fixed adding enum ItemStateFilter 2016-03-10 22:45:03 +05:30
Gabriel Weyer
e7f17bd68d Added Id And Locked properties to Issue, fixed XML comment of Update Issue (was a copy of Create Issue) 2015-12-23 16:17:57 +11:00
Brendan Forster
80719c0033 aaaand format the code 2015-11-04 13:38:51 -08:00
William Barbosa
847cd1b2c8 Adds common properties to RepositoryContext
A lot of classes use the name and the owner of the repository, so for
consistency I added those as properties of the Context
2015-09-27 00:38:52 -03:00
William Barbosa
42e480c2c0 Refactors a whole bunch of tests 2015-09-26 23:37:54 -03:00
Henrik Andersson
0600ffdb03 Add Events URL to the Issue class. 2015-09-18 23:25:55 +10:00
Mordechai Zuber
d83a4bbcbc Octokit.Tests.Integration\Clients 2015-05-19 09:54:08 +03:00
Henrik Andersson
189ae42c3a Update tests 2015-03-24 00:12:54 +10:00
Haacked
a94051d6b0 Repository name is required when creating a repo
I was trying to create a repository and I wasn't sure which parameters
were required. Following our philosophy of exposing required parameters
in the constructor, I change the `NewRepository` object to take in a
repository name and to make that property readonly.
2015-03-19 16:25:03 -07:00
Brendan Forster
6bfd6fdcc1 added ClearLabels helper function 2015-02-24 13:02:24 +09:30
Brendan Forster
0d271856b8 made some tests 2015-02-24 12:39:53 +09:30
Brendan Forster
28e8372922 extract helper method for setting up GitHubClient 2015-01-04 10:03:45 +09:30
Brendan Forster
6a35ea8f18 some more slow tests 2014-12-22 21:28:16 +09:30
Brendan Forster
a73272900a no longer throws when creator is a random account 2014-12-10 19:59:25 +10:30
Phil Haack
bcd90e33fc Merge pull request #550 from MitjaBezensek/Issue517
Fixed the problem with ItemState enum
2014-08-04 09:13:10 -07:00
Mitja Bezenšek
a32a9d16c7 Removed duplicated integration tests for IssuesClient. Closes #551 2014-08-04 01:30:37 +02:00
Mitja Bezenšek
bc5990a9eb Add integration test for retrieving all issues. 2014-08-04 00:42:00 +02:00
Brendan Forster
6e2206af44 added failing test 2014-07-08 08:30:39 +09:30
Haacked
90edfa65a6 Fixed a couple more tests
We don't need to await tests of argument validation. But we do need to
await tests that test exceptions returned from a task.
2014-03-21 13:56:30 -07:00
Brendan Forster
b8cc3d65a9 added support for searching by mentions 2014-03-08 12:14:20 +11:00
Brendan Forster
fdbe330cee 💄 test variable names 2014-03-08 12:13:34 +11:00
Brendan Forster
5a468c35c9 added test for API throwing errors 2014-03-08 11:58:32 +11:00
Brendan Forster
33c3954599 added support for filtering by creator 2014-03-08 11:58:19 +11:00
Brendan Forster
f286d9d3c3 add support for filtering issues based on assigned name 2014-03-08 11:52:31 +11:00
Tim Sneed
3909498437 Internalize ProductHeaderValue
What Haacked, PaulBetts, and Shiftkey suggested
2014-02-28 06:33:44 -06:00