473,326 Members | 2,124 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

NUnit + User Defined Objects in Web Services

I have a web service in which I declare a user defined object. One of the
properties, I declare it and default it's value as follows:

private DateTime _callbackTime = ADPDS.Utility.Utility.DBNullToDate(null);
public DateTime CallbackTime
{
set{
if(ADPDS.Utility.Utility.IsNullDate(value) == true)
_callbackTime = ADPDS.Utility.Utility.DBNullToDate(null);
else
_callbackTime = ADPDS.Utility.Utility.DBNullToDate(value);
}
get{return(ADPDS.Utility.Utility.DBNullToDate(_cal lbackTime));}
}

DBNullToDate is a simeple static method that accepts an object and returns
1/1/1900 if the object is null.

In my NUnit test method, I create the object :
WSNUnit.localhost.DataObject obj = new WSNUnit.localhost.DataObject();

I can see all the properties fine, but when I look at the default property,
I don't see it set to the default. This also happens for other property types
such as strings. I set the default to "A", but I get a null in the value
after I create the object.

Using this works fine in regular assemblies, where I declare the object in a
referenced assembly, and when I create the object in the project, it inherits
the default values as it should.

Is this behaviour different for Web Services?
Mar 28 '06 #1
0 974

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Peter Rilling | last post by:
My development team is using VS.NET with VSS integration. They are able to check in and out from within VS.NET. We also use NUnit for testing our libraries. Currently our entire solution is...
1
by: Henry | last post by:
I have a large number of user define class objects and want display in a datagrid and able to perform paging and column sorting. It seems using DataView is the easiest way but the objects are not...
1
by: Sugandh | last post by:
HI! I recently started using Nunit. Wanted to find out whether we can test the COM+ transactional services through NUNIT. As in if transaction is supposed to roll back, check whether it is...
5
by: Naveen Mukkelli | last post by:
Hi all, How can we use "NUnit" in socket programming. I mean, I'm writing a server program which accepts connection requests from the clients. I want to test the number of clients whenever a...
2
by: Popoxinhxan | last post by:
Could anyone give me a guide or example of how to test the web service Here is my web service but i don't know how to write the test for it public class Service{ private string m_ERR_NO_LISTING=...
0
by: fishball79 | last post by:
Hi all, I'm encountering a weird problem. I am attempting to run NUnit tests on web services (developed on .net framework 1.1) hosted on a seperate machine on the intranet. I can access the...
4
by: David Thielen | last post by:
Hi; Are there mock objects anywhere that I can use to write nunit tests for my code behind methods? -- thanks - dave david_at_windward_dot_net http://www.windwardreports.com
9
by: Brian Hampson | last post by:
I am trying to determine all the groups which the current user has permissions to add a member. Here's my code: foreach (System.DirectoryServices.SearchResult ADSearchres in...
2
by: Mark Elliott | last post by:
Hi All, I'm just playing with asp.net mvc and link-to-sql for the first time. I'm using visual web developer 2008. I create the project fine, choose nunit as my test framework in the wizard. ...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.