• About
  • Privacy Policy
  • Utilities
Darchuk.NET

unit testing

Mocking TcpClient

January 19, 2018 by Robert Leave a Comment

Sometimes I want to unit test the pieces of my code that are close to the transport layer, but often they are so close to the metal that it is hard to separate them. There’s really not a great way to abstract out the communication layer, so you just have to bite the bullet and … [Read more…]

Posted in: C#, Unit Testing Tagged: C#, Mock, TCP, TcpClient, unit testing

Unit testing error paths of Observable

December 8, 2017 by Robert 1 Comment

When you write code against an Observable, you subscribe to the result.  In the subscribe method you provide the callbacks to perform when the Observable is called back.  That means you can execute different code for success and failure. In the last post I wrote about how to mock up and test Observable<T> in Jasmine … [Read more…]

Posted in: Angular, JavaScript, Unit Testing, Web Development Tagged: JavaScript, rxjs, Typescript, unit testing
« Previous 1 2 3

Recent Posts

  • Allowing trailing JSON commas in ASP.NET Core 3
  • YADNC3JSG–Yet Another .NET Core 3.0 JSON Serializer Gotcha
  • Logging in a .NET Core 3 SignalR client
  • .NET Core 3 unit testing project sdk
  • .NET Core 3.0 Upgrade–New JSON Serializer Gotchas

Recent Comments

  1. Robert on C# Setting Socket Keep-Alive
  2. Oliver Schramm on C# Setting Socket Keep-Alive
  3. John Anderson on Waiting for a keypress asynchronously in a C# console app
  4. Ronald Garlit on .NET Core 3 unit testing project sdk
  5. Ronald Garlit on .NET Core 3 unit testing project sdk

Copyright © 2025 Darchuk.NET.

Omega WordPress Theme by ThemeHall