Click here to Skip to main content
15,923,051 members
Home / Discussions / C#
   

C#

 
GeneralRe: Convert Dll c#2 to WOrk on C#4 Pin
md_refay8-Aug-11 18:47
md_refay8-Aug-11 18:47 
GeneralRe: Convert Dll c#2 to WOrk on C#4 Pin
Mycroft Holmes8-Aug-11 23:35
professionalMycroft Holmes8-Aug-11 23:35 
QuestionExcel Interop - Excel Not Closing Pin
Kevin Marois8-Aug-11 7:20
professionalKevin Marois8-Aug-11 7:20 
AnswerRe: Excel Interop - Excel Not Closing Pin
PIEBALDconsult8-Aug-11 15:39
mvePIEBALDconsult8-Aug-11 15:39 
AnswerRe: Excel Interop - Excel Not Closing Pin
BobJanova8-Aug-11 23:13
BobJanova8-Aug-11 23:13 
AnswerRe: Excel Interop - Excel Not Closing Pin
NarVish10-Aug-11 1:40
NarVish10-Aug-11 1:40 
QuestionObjectDataSource seems to bind, but doesn't, really. Pin
ShearWater5098-Aug-11 6:58
professionalShearWater5098-Aug-11 6:58 
QuestionHow to unit test this method Pin
chuckdawit8-Aug-11 6:28
chuckdawit8-Aug-11 6:28 
Say I create a unit test that looks something like this below (autogenerated by VS) to test:

[TestMethod()]

public void UniContexPipeDataTest()

{

IResponse response = null; // TODO: Initialize to an appropriate value

ISeries series = null; // TODO: Initialize to an appropriate value

DateTime asof = new DateTime(); // TODO: Initialize to an appropriate value

UniContext target = new UniContext(response, series, asof);

target.PipeData();

Assert.Inconclusive("TODO: Implement code to verify target");



}



I know I have to initialize response and series but they are big and have lots of other objects and Interfaces embedded within them that need to be instantiated for the UniContext contructor and PipeData() to work correctly.

Q. How do I get the interfaces ready so that the constructor and method PipeData() pass in this unit test?

Right now I can create these objects and interfaces to pass into the target but they will be empty. Both IResponse and ISeries have tons of embedded interfaces and other things like other objects and properties inside them that need to be created and instantiated with data.

Do I need to start with the embedded object first and then do a ordered test unit test type deal?

Do I need to learn about stubs, external dependencies and creating mocks objects?

Any help/advice on this will be appreciated.


--------------------------------------------------------------------------------
QuestionLucene .Net: search results are case sensitive Pin
NarVish8-Aug-11 2:00
NarVish8-Aug-11 2:00 
AnswerRe: Lucene .Net: search results are case sensitive Pin
Pete O'Hanlon8-Aug-11 2:24
mvePete O'Hanlon8-Aug-11 2:24 
GeneralRe: Lucene .Net: search results are case sensitive Pin
NarVish9-Aug-11 19:58
NarVish9-Aug-11 19:58 
QuestionSerialization of a Func property Pin
cjb1108-Aug-11 0:01
cjb1108-Aug-11 0:01 
Questionproject upgrade Pin
wasifmuneer7-Aug-11 20:40
wasifmuneer7-Aug-11 20:40 
QuestionDatagidview custom data Pin
sarang_k7-Aug-11 18:57
sarang_k7-Aug-11 18:57 
AnswerRe: Datagidview custom data Pin
Mycroft Holmes7-Aug-11 19:16
professionalMycroft Holmes7-Aug-11 19:16 
QuestionC# coding Pin
DammyMulero7-Aug-11 18:54
DammyMulero7-Aug-11 18:54 
AnswerRe: C# coding Pin
Richard MacCutchan7-Aug-11 21:52
mveRichard MacCutchan7-Aug-11 21:52 
AnswerRe: C# coding Pin
BobJanova7-Aug-11 23:14
BobJanova7-Aug-11 23:14 
AnswerRe: C# coding Pin
#realJSOP8-Aug-11 1:49
professional#realJSOP8-Aug-11 1:49 
GeneralRe: C# coding Pin
Not Active8-Aug-11 1:53
mentorNot Active8-Aug-11 1:53 
AnswerRe: C# coding Pin
V.8-Aug-11 2:16
professionalV.8-Aug-11 2:16 
AnswerRe: C# coding Pin
PIEBALDconsult8-Aug-11 2:48
mvePIEBALDconsult8-Aug-11 2:48 
QuestionHow do I store two int values into one DWORD, and then convert it to a 4 byte array? Pin
stephen.darling7-Aug-11 11:04
stephen.darling7-Aug-11 11:04 
AnswerRe: How do I store two int values into one DWORD, and then convert it to a 4 byte array? Pin
PIEBALDconsult7-Aug-11 13:44
mvePIEBALDconsult7-Aug-11 13:44 
AnswerRe: How do I store two int values into one DWORD, and then convert it to a 4 byte array? Pin
Luc Pattyn7-Aug-11 15:32
sitebuilderLuc Pattyn7-Aug-11 15:32 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.