Discussion Forum : unit-testing

PHPUnit: assert two arrays are equal, but order of elements not important
What is a good way to assert that two arrays of objects are equal, when the order of the elements in the array is unimpo ... View Detail
 Upvotes: 0   Answers: 0
How can I get PHPUnit MockObjects to return different values based on a parameter?
I've got a PHPUnit mock object that returns 'return value' no matter what its arguments: // From inside a test... $mock ... View Detail
 Upvotes: 0   Answers: 0
Getting PHPUnit Working - Include Path not set correctly?
I'm trying to get PHPUnit working on my development environment but I've hit a bit of a roadblock when it comes to inclu ... View Detail
 Upvotes: 0   Answers: 0
How to output in CLI during execution of PHP Unit tests?
When running a PHPUnit test, I would like to be able to dump output so I can debug one or two things. I have tried the ... View Detail
 Upvotes: 0   Answers: 0
Best practices to test protected methods with PHPUnit
I found the discussion on Do you test private method informative. I have decided, that in some classes, I want to have ... View Detail
 Upvotes: 0   Answers: 0
Unit testing that an event is raised in C#
I have some code that raises PropertyChanged events and I would like to be able to unit test that the events are being r ... View Detail
 Upvotes: 0   Answers: 0
How do you mock out the file system in C# for unit testing?
Are there any libraries or methods to mock out the file system in C# to write unit tests? In my current case I have meth ... View Detail
 Upvotes: 0   Answers: 0
Controlling execution order of unit tests in Visual Studio
Okay, I'm done searching for good information on this. I have a series of Unit Tests that call a static class which, onc ... View Detail
 Upvotes: 0   Answers: 0
Using Moq, How to setup a method call with an input parameter as an object with expected property values?
Using Moq, How to setup a method call with an input parameter as an object with expected property values?  var storageM ... View Detail
 Upvotes: 0   Answers: 0
How to mock static methods in c# using MOQ framework?
I have been doing unit testing recently and i successfully mocked various scenario with using MOQ framework and MS Tests ... View Detail
 Upvotes: 0   Answers: 0
Unit test, NUnit or Visual studio?
I'm using Visual studio (sometimes resharper) to run my unit test. I heard about NUnit, but I don't know many things ab ... View Detail
 Upvotes: 0   Answers: 0
How to write output from a unit test?
Any call in my unit tests to either Debug.Write(line) or Console.Write(Line) simply gets skipped over while debugging an ... View Detail
 Upvotes: 0   Answers: 0
Unit Testing: DateTime.Now
I have some unit tests that expects the 'current time' to be different than DateTime.Now and I don't want to change the ... View Detail
 Upvotes: 0   Answers: 0
How can I get Copy to Output Directory to work with Unit Tests?
When I build a unit test project before the tests are executed the test output is copied to a TestResults folder and the ... View Detail
 Upvotes: 0   Answers: 0
How to add cookies to WebRequest?
I am trying to unit test some code, and I need to to replace this:   HttpWebRequest httpWebRequest = (HttpWebRequest)We ... View Detail
 Upvotes: 0   Answers: 0
Verifying a specific parameter with Moq
public void SubmitMessagesToQueue_OneMessage_SubmitSuccessfully() {  var messageServiceClientMock = new Mock<IMessageSer ... View Detail
 Upvotes: 0   Answers: 0
Unit testing void methods?
What is the best way to unit test a method that doesn't return anything? Specifically in c#. What I am really trying to ... View Detail
 Upvotes: 0   Answers: 0
Problems with DeploymentItem attribute
I'm currently maintaining an old system written in C#.net, removing some obsolete features and doing some refactoring. T ... View Detail
 Upvotes: 0   Answers: 0
How are people unit testing with Entity Framework 6, should you bother?
I am just starting out with Unit testings and TDD in general. I have dabbled before but now I am determined to add it to ... View Detail
 Upvotes: 0   Answers: 0
Using Moq to determine if a method is called
It is my understanding that I can test that a method call will occur if I call a higher level method, i.e.: public abst ... View Detail
 Upvotes: 0   Answers: 0
How do you know what to test when writing unit tests?
Using C#, I need a class called User that has a username, password, active flag, first name, last name, full name, etc. ... View Detail
 Upvotes: 0   Answers: 0
Test method is inconclusive: Test wasn't run. Error?
I have a test class and below I have posted a sample test from the test class namespace AdminPortal.Tests.Controller_Te ... View Detail
 Upvotes: 0   Answers: 0
Why am I getting an Exception with the message Invalid setup on a non-virtual (overridable in VB) member...?
I have a unit test where I have to mock a non-virtual method that returns a bool type public class XmlCupboardAccess {  ... View Detail
 Upvotes: 0   Answers: 0
Which unit testing framework?
I wondered which unit testing framework would be a good one to get really familiar with? I know this might be a questio ... View Detail
 Upvotes: 0   Answers: 0
How to run a test method with multiple parameters in MSTest?
NUnit has a feature called Values, like below: [Test] public void MyTest(  [Values(1,2,3)] int x,  [Values(A,B)] string ... View Detail
 Upvotes: 0   Answers: 0

Quick Links



Total Followers
Study Group Created
Study Group Joined
Following Teacher
Following Organization
Blog Articles Added
Questions Asked
Questions Answered
Jobs Posted
Total Members in Group
Questions asked by members
Tasks added in this Group

Please wait..


Login to Open ESchool OR Create your account    Login   SignUp