Skip to content

Conversation

@ThomasF34
Copy link
Contributor

What does this PR do ?

Add unit test for realtime controller.

Other changes

  • Fix error on Count function : It should return the count attribute of the result
  • Fix mocking error : The IKuzzleAPI interface contains objects (like NetworkProtocol) that should be mocked. To mock recursively, i added the option in the creation of the mock.

@ThomasF34
Copy link
Contributor Author

Feel free to tell me if you see more tests that could be done

@ThomasF34 ThomasF34 self-assigned this Jun 24, 2019
@codecov
Copy link

codecov bot commented Jun 24, 2019

Codecov Report

Merging #18 into 0-dev will increase coverage by 22.15%.
The diff coverage is 100%.

Impacted file tree graph

@@             Coverage Diff             @@
##            0-dev      #18       +/-   ##
===========================================
+ Coverage   59.08%   81.24%   +22.15%     
===========================================
  Files          17       18        +1     
  Lines         875      885       +10     
  Branches      105      108        +3     
===========================================
+ Hits          517      719      +202     
+ Misses        357      160      -197     
- Partials        1        6        +5
Impacted Files Coverage Δ
Kuzzle/API/Controllers/RealtimeController.cs 93.33% <100%> (+93.33%) ⬆️
Kuzzle/Exceptions/InternalException.cs 100% <0%> (ø)
Kuzzle/Protocol/AbstractProtocol.cs 14.28% <0%> (+14.28%) ⬆️
Kuzzle/API/Options/SubscribeOptions.cs 33.33% <0%> (+33.33%) ⬆️
Kuzzle/Kuzzle.cs 87.15% <0%> (+87.15%) ⬆️
Kuzzle/Exceptions/ConnectionLostException.cs 100% <0%> (+100%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 493cba1...5405492. Read the comment docs.

@ThomasF34 ThomasF34 force-pushed the unit-tests-realtime-controller branch from 9eafc10 to ac52dbc Compare June 25, 2019 11:55
@ThomasF34 ThomasF34 requested a review from scottinet June 26, 2019 09:55
@Aschen Aschen merged commit 335be99 into 0-dev Jun 27, 2019
@Aschen Aschen deleted the unit-tests-realtime-controller branch June 27, 2019 12:51
@scottinet scottinet mentioned this pull request Jul 17, 2019
scottinet added a commit that referenced this pull request Jul 18, 2019
# [0.2.0](https://github.com/kuzzleio/sdk-csharp/releases/tag/0.2.0) (2019-07-17)


#### New features

- [ [#22](#22) ] Add Admin controller and unit tests   ([Shiranuit](https://github.com/Shiranuit))
- [ [#23](#23) ] Add Index Controller   ([alexandrebouthinon](https://github.com/alexandrebouthinon))

#### Enhancements

- [ [#14](#14) ] Fix optional parameters design   ([scottinet](https://github.com/scottinet))
- [ [#13](#13) ] Add unit tests for the collection controller   ([scottinet](https://github.com/scottinet))
- [ [#12](#12) ] Add unit tests for the auth controller   ([scottinet](https://github.com/scottinet))
- [ [#11](#11) ] Initialize unit tests project   ([scottinet](https://github.com/scottinet))

#### Others

- [ [#24](#24) ] Rewrite WebSocket class   ([scottinet](https://github.com/scottinet), [alexandrebouthinon](https://github.com/alexandrebouthinon))
- [ [#20](#20) ] Add documentation runner   ([Aschen](https://github.com/Aschen))
- [ [#18](#18) ] Add unit test for Realtime Controller    ([ThomasF34](https://github.com/ThomasF34))
- [ [#17](#17) ] Unit tests kuzzle class   ([Aschen](https://github.com/Aschen))
- [ [#16](#16) ] Add unit tests for the server controller   ([ThomasF34](https://github.com/ThomasF34))
- [ [#15](#15) ] Add unit tests for the document controller   ([scottinet](https://github.com/scottinet))
---
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants