C# Unit Testing Example

  Рет қаралды 7,803

Raw Coding

Raw Coding

Күн бұрын

Пікірлер: 25
@The69pawlak
@The69pawlak 4 жыл бұрын
Quality content, as always !
@RawCoding
@RawCoding 4 жыл бұрын
Cheers
@pedroferreira9234
@pedroferreira9234 4 жыл бұрын
Nice video as always. One question, why cartCheckout isnt wrap in a interface in this case?
@RawCoding
@RawCoding 4 жыл бұрын
Yes, so it’s a service that has a custom in and out params, I have many of these services which aren’t exactly composable, so putting it behind an interface will require a lot of work which I don’t need to do
@mahmoudalaskalany
@mahmoudalaskalany 4 жыл бұрын
i wanted to ask u if there any alternative for Identity Server 4
@RawCoding
@RawCoding 4 жыл бұрын
What’s your use case?
@mahmoudalaskalany
@mahmoudalaskalany 4 жыл бұрын
@@RawCoding i need to use .net 5 but identity server does not support it unless in the new paid version duende identity server
@RawCoding
@RawCoding 4 жыл бұрын
There OpenDict 3, although being on .net5 is not a use case
@mahmoudalaskalany
@mahmoudalaskalany 4 жыл бұрын
i have read about it and am planing to move to it thank u man ❤️
@mahmoudalaskalany
@mahmoudalaskalany 4 жыл бұрын
thanks man in advance ❤️
@RawCoding
@RawCoding 4 жыл бұрын
Thanks
@saurabhchauhan232
@saurabhchauhan232 4 жыл бұрын
Thank you 👌
@RawCoding
@RawCoding 4 жыл бұрын
No, thank you!
@saurabhchauhan232
@saurabhchauhan232 4 жыл бұрын
@@RawCoding Why did you created Two other mock classes, just want to know like the Staff Registration, other can also be mocked with Setup method why did you choose override approach 🙂
@RawCoding
@RawCoding 4 жыл бұрын
I think I mention this in the video, I do put one of em behind an interface later in my own time. But using Moq on objects doesn’t work last time I checked. So yeah we mock them by extension rather than hiding them behind and interface, additionally I can’t mock my service since putting it behind an interface could make things a lot harder for me.
@saurabhchauhan232
@saurabhchauhan232 4 жыл бұрын
@@RawCoding Yes you do mentioned that, but the last part helped that using interface everywhere help you in mocking but add complexity/did not help better in implementation polymorphism
@jinhe620
@jinhe620 3 жыл бұрын
Quite helpful as usual. Btw, Could you please upload the code?
@RawCoding
@RawCoding 3 жыл бұрын
Eya, nope some of it is in a private repo
@clearlyunwell
@clearlyunwell 3 жыл бұрын
👍🏽
@RawCoding
@RawCoding 3 жыл бұрын
)
@GZPlays_uno
@GZPlays_uno 2 жыл бұрын
Will fix it later! Never!
@torrvic1156
@torrvic1156 2 ай бұрын
Things are so confusing in your video. Naming is pretty weird honestly. Why class named with a verb?
@RawCoding
@RawCoding 2 ай бұрын
I prefer ProcessX, TransferY, AuditStorage, rather than EntityManager, EntityService… So the class is scope for an action, rather than pretending its some object entity thats out there doing something.
@torrvic1156
@torrvic1156 2 ай бұрын
@ thanks for clarification!
@kaushikchakraborty4887
@kaushikchakraborty4887 8 ай бұрын
your voice is not always properly audible.
C# Integration Testing Tutorial
40:25
Raw Coding
Рет қаралды 37 М.
СИНИЙ ИНЕЙ УЖЕ ВЫШЕЛ!❄️
01:01
DO$HIK
Рет қаралды 3,3 МЛН
BAYGUYSTAN | 1 СЕРИЯ | bayGUYS
36:55
bayGUYS
Рет қаралды 1,9 МЛН
Writing tests in .NET using xUnit -  xUnit Tutorial
25:50
Nick Chapsas
Рет қаралды 130 М.
Mocking in C# Unit Tests - How To Test Data Access Code and More
1:02:34
C# Unit Test Mocking with Moq
44:53
Raw Coding
Рет қаралды 32 М.
C# Delegates & Lambdas Explained
32:43
Raw Coding
Рет қаралды 39 М.
My 10 “Clean” Code Principles (Start These Now)
15:12
Conner Ardman
Рет қаралды 322 М.
What you should know about Threads in .NET
14:52
Raw Coding
Рет қаралды 8 М.
How To CORRECTLY Unit Test A .Net API Using Moq & AutoFixture
23:03
Israel Quiroz
Рет қаралды 18 М.
Better Java Streams with Gatherers - JEP Cafe #23
1:13:32
Writing Code That Runs FAST on a GPU
15:32
Low Level
Рет қаралды 578 М.