Click here to Skip to main content
15,891,905 members
Home / Discussions / C#
   

C#

 
AnswerRe: How do Access INI file value in C# 2.0 Windows Service Project Pin
Not Active19-Sep-07 3:08
mentorNot Active19-Sep-07 3:08 
GeneralRe: How do Access INI file value in C# 2.0 Windows Service Project Pin
Sundarapandian.Balasubramanian19-Sep-07 3:42
Sundarapandian.Balasubramanian19-Sep-07 3:42 
Questioncant see my site in browser! Pin
confusedme19-Sep-07 0:07
confusedme19-Sep-07 0:07 
AnswerRe: cant see my site in browser! Pin
samforu19-Sep-07 1:59
samforu19-Sep-07 1:59 
GeneralRe: cant see my site in browser! Pin
confusedme19-Sep-07 18:58
confusedme19-Sep-07 18:58 
AnswerRe: cant see my site in browser! Pin
Dave Kreskowiak19-Sep-07 5:22
mveDave Kreskowiak19-Sep-07 5:22 
AnswerRe: cant see my site in browser! Pin
confusedme19-Sep-07 18:40
confusedme19-Sep-07 18:40 
QuestionNUnit Pin
Rohde18-Sep-07 23:59
Rohde18-Sep-07 23:59 
I'm doing a C# application and want to do some unit testing on some of the stuff using NUNit.

I'm having problems with a test method. The test method is as follows:

<br />
        [Test]<br />
        public void TestGetBlacklistByGirl()<br />
        {<br />
            // Test object<br />
            List<string> list = new List<string>();<br />
            list.Add("bing");<br />
            list.Add("ht7");<br />
            list.Add("rohde");            <br />
            BlacklistDetails testObject = new BlacklistDetails(12, list);<br />
<br />
            BlacklistDetails returnObject = BlacklistProvider.Instance.GetBlacklistByGirl(12);            <br />
<br />
<br />
            //Assert.That(testObject.Equals(returnObject), Is.True);<br />
        }<br />


Even though the Assert is commented out, NUnit reports an error at the line above - specifically with the Instance property which is:

<br />
        static public BlacklistProvider Instance<br />
        {<br />
            get<br />
            {<br />
                if (instance == null)<br />
                {<br />
                    instance = (BlacklistProvider)Activator.CreateInstance(<br />
                        Type.GetType(RSDConfiguration.BlacklistProvider));<br />
                }<br />
                return instance;<br />
            }<br />
        }<br />


When using the method outside NUnit it works as expected, but NUnit has a problem with it. I have no idea why NUnit complaints about it -- it's just a normal property, and it works fine.

Any ideas?



"When you have made evil the means of survival, do not expect men to remain good. Do not expect them to stay moral and lose their lives for the purpose of becoming the fodder of the immoral. Do not expect them to produce, when production is punished and looting rewarded. Do not ask, `Who is destroying the world?' You are."

-Atlas Shrugged, Ayn Rand

AnswerRe: NUnit Pin
Robert Rohde19-Sep-07 1:57
Robert Rohde19-Sep-07 1:57 
GeneralRe: NUnit Pin
Rohde19-Sep-07 2:15
Rohde19-Sep-07 2:15 
QuestionMax member of ArrayList? Pin
bug_aonz18-Sep-07 23:00
bug_aonz18-Sep-07 23:00 
AnswerRe: Max member of ArrayList? Pin
garyshort18-Sep-07 23:12
garyshort18-Sep-07 23:12 
AnswerRe: Max member of ArrayList? Pin
Dave Kreskowiak19-Sep-07 5:17
mveDave Kreskowiak19-Sep-07 5:17 
QuestionSocket Connection, help me please!!!! Pin
Vampire1986hieu18-Sep-07 21:47
Vampire1986hieu18-Sep-07 21:47 
AnswerRe: Socket Connection, help me please!!!! Pin
garyshort18-Sep-07 23:15
garyshort18-Sep-07 23:15 
AnswerRe: Socket Connection, help me please!!!! Pin
ramdil19-Sep-07 0:32
ramdil19-Sep-07 0:32 
GeneralRe: Socket Connection, help me please!!!! Pin
Vampire1986hieu20-Sep-07 16:11
Vampire1986hieu20-Sep-07 16:11 
QuestionHelp on pinvoke functions Pin
izakfick18-Sep-07 21:43
izakfick18-Sep-07 21:43 
NewsFeedback: How to find the number of current window handles [modified] Pin
Martin#18-Sep-07 21:27
Martin#18-Sep-07 21:27 
GeneralRe: Feedback: How to find the number of current window handles Pin
ramdil19-Sep-07 0:33
ramdil19-Sep-07 0:33 
GeneralRe: Feedback: How to find the number of current window handles Pin
Martin#19-Sep-07 2:16
Martin#19-Sep-07 2:16 
GeneralRe: Feedback: How to find the number of current window handles Pin
Robert Rohde19-Sep-07 2:53
Robert Rohde19-Sep-07 2:53 
GeneralRe: Feedback: How to find the number of current window handles Pin
Martin#19-Sep-07 3:04
Martin#19-Sep-07 3:04 
GeneralRe: Feedback: How to find the number of current window handles Pin
Dave Kreskowiak19-Sep-07 5:28
mveDave Kreskowiak19-Sep-07 5:28 
GeneralRe: Feedback: How to find the number of current window handles Pin
Martin#19-Sep-07 8:17
Martin#19-Sep-07 8:17 

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.