NSubstitute Received should apply to the class, not to the method

I was using NSubstitute and tried to check that the method CountryName was called by using the following
LocationHelper.CountryName(“AU”).Received(1);//incorrectCompiler was happy about this, but when running the test, I’ve got an exception

{NSubstitute.Exceptions.NotASubstituteException: NSubstitute extension methods like .Received() can only be called on objects created using Substitute.For<T>() and related methods.

 at NSubstitute.Core.CallRouterResolver.ResolveFor(Object substitute)

   at NSubstitute.Core.SubstituteFactory.GetCallRouterCreatedFor(Object substitute)
   at NSubstitute.Core.SubstitutionContext.GetCallRouterFor(Object substitute)
   at NSubstitute.SubstituteExtensions.GetRouterForSubstitute[T](T substitute)
   at NSubstitute.SubstituteExtensions.Received[T](T substitute, Int32 requiredNumberOfCalls)
   at TSA.UnitTests.Content.Passenger.PreviousPassengerHelperTests.DataSetToPreviousPassengerEntriesList_CountryCodeNotEmpty_ShouldReturnNationalityAsCountryName() in C:\GitRepos\tsa\test\UnitTests\Content\Passenger\PreviousPassengerHelperTests.cs:line 33}
It took me some time to realize that  Received method should apply to the class and be caked BEFORE  the method, that it’s checking.
So the correct syntax is the following:
 
locationHelper.Received(1).CountryName(“AU”); //correct
 
Even without substituting for specific parts of a class, the instance returned by Substitute.ForPartsOf<T> records all calls made to virtual members, so we can check Received() calls made to any partial substitute.

#bandieuhoacuanphuc, #baoduongdieuhoaanphuc, #ban_dieu_hoa_cu_an_phuc, #ha_tuan_khang, #lapdieuhoaanhuc, #muadieuhoacu, #seoconghuong, #signal_buiding, #suadieuhoaanphuc, #trendy, #user_is_king

I moved my blog from GeeksWithBlogs

This is my first post at WordPress. I  had a http://geekswithblogs.net/mnf/ blog at GeeksWithBlogs for 10 years. But recently I had a big concern, that  GeeksWithBlogs site is not supported at all. The support does not reply to emails, Twitter messages and reports on the support forum.  I will not be surprised, if the GWB site will suddenly shutdown without any warning.

I did a research to find  a blogging platform, and WordPress was recommended in most places. It was a big work to migrate the blog, because there is no out of the box tools ( The  code that I was using is located on https://github.com/MNF/gwb-to-wordpress ).

Now I am thinking how can I achieve the traffic and search engine ranking, that I had in GeeksWithBlogs.

#blog-migration