Top "Vs-unit-testing-framework" questions

Microsoft's unit testing framework

Set Up Test Method with different inputs

I want to test the following method in C# for all code paths. public int foo (int x) { if(x == 1) …

c# visual-studio-2010 unit-testing vs-unit-testing-framework
DeploymentItem not deploying files

I am using MS unit testing framework for testing my C# library. I have to open a file which I'm …

c# unit-testing visual-studio-2012 vs-unit-testing-framework deploymentitem
Classes marked with TestInitialize and TestCleanup not executing

I have been struggling with this one, hopefully it will help someone else. Whilst creating unit tests using MsTest I …

c# mstest vs-unit-testing-framework
StreamWriter.WriteLine() is not working

I am trying to write several lines, one at a time, to a .txt file using StreamWriter.WriteLine (Not statically). …

c# file-io text-files vs-unit-testing-framework
Model state validation in unit tests

I am writing a unit test for a controller like this: public HttpResponseMessage PostLogin(LoginModel model) { if (!ModelState.IsValid) return …

c# unit-testing asp.net-web-api vs-unit-testing-framework model-validation
ClassInitialize attribute in unit test based class not called

I added these method in a TestBase class : [ClassInitialize] public static void InitializBeforeAllTests() { } But when I run in Debug an …

c# vs-unit-testing-framework
.net core projects code coverage visual studio 2017

I am using Visual Studio Enterprise 2017 to develop my .net core projects. My solution also has some unit test projects …

code-coverage visual-studio-2017 xunit vs-unit-testing-framework
Add Fakes Assembly option missing

I'm trying to get the Microsoft Fakes up and running in a Unit test project that I've set up in …

visual-studio-2012 vs-unit-testing-framework microsoft-fakes
MSTest cannot find the assembly

I was using MSTest and i use command mstest /testsettings:local.Testsetting /testcontainer:folder\obj\Debug\test.dll and this …

c# unit-testing mstest vs-unit-testing-framework