I have a business, service and web projects in my solution. Services is WCF library referencing the business layer and web host references Services and inherits my WCF service contracts.
In my unit test project I'm referencing the Web host which pulls in all the classes, methods, etc. when I setup my NewApplication request object it is not instantiating the user defined properties.
[DataContract]
public class NewApplication{
private CustomerAddress _customerAddress;
public NewApplication()
{
_customerDetailData = new CustomerDetail();
}
[DataMember]
public CustomerDetail PrimaryCustomerData
{
get { return this._customerDetailData; }
set { this._customerDetailData = value; }
}
}
[TestMethod]
public void TestNewApplication{}
{
NewApplication _newApp = new NewApplication();
_newApp.PrimaryCustomerData.Address1 //THIS IS NULL, PrimaryCustomerData
}
What am I doing wrong here?