Click here to Skip to main content
16,017,922 members
Home / Discussions / C#
   

C#

 
AnswerRe: Tracking Data Changes Pin
Gerry Schmitz13-Dec-19 12:38
mveGerry Schmitz13-Dec-19 12:38 
GeneralRe: Tracking Data Changes Pin
Kevin Marois16-Dec-19 10:51
professionalKevin Marois16-Dec-19 10:51 
GeneralRe: Tracking Data Changes Pin
Gerry Schmitz16-Dec-19 12:06
mveGerry Schmitz16-Dec-19 12:06 
QuestionHow do you make a unit test of an empty linked list? Pin
Melissa Anthonia13-Dec-19 7:56
Melissa Anthonia13-Dec-19 7:56 
AnswerRe: How do you make a unit test of an empty linked list? Pin
Melissa Anthonia13-Dec-19 9:13
Melissa Anthonia13-Dec-19 9:13 
GeneralRe: How do you make a unit test of an empty linked list? Pin
Gerry Schmitz13-Dec-19 12:49
mveGerry Schmitz13-Dec-19 12:49 
GeneralRe: How do you make a unit test of an empty linked list? Pin
Melissa Anthonia13-Dec-19 13:45
Melissa Anthonia13-Dec-19 13:45 
AnswerRe: How do you make a unit test of an empty linked list? Pin
Melissa Anthonia14-Dec-19 3:14
Melissa Anthonia14-Dec-19 3:14 
So far so good, but I am basically coding in blindness at this point.
I got the first test to run.

C#
[TestMethod]
public void Index()
{
    // Arrange
    List<string> list = new List<string>();

    // Act
    bool isEmpty = (list.Count == 0);

    // Assert
    Assert.AreEqual(0, list.Count());

}


The next part of the code that I am going to test is this:
C#
public int Length()
{
    return size;
}


Using knowledge from the last test, I am... guessing this how I am supposed to test this part, but I am not sure what to write in Assert.
C#
public void NumberOfObjects()
{
    // Arrange
    List<int> lenght = new List<int>();

    // Act
    lenght.Count();

    // Assert

}


I have googled and searched on places like Youtube, but I have yet to find a tutorial that talks about conducting unit testing on linked lists.
If you know of any website or tutorial that explains it, then I would be very happy.
Questiondesign a printdocument control with a text and boxes like filling form Pin
bimalachira13-Dec-19 7:06
bimalachira13-Dec-19 7:06 
AnswerRe: design a printdocument control with a text and boxes like filling form Pin
OriginalGriff13-Dec-19 8:03
mveOriginalGriff13-Dec-19 8:03 
Questionc# memory crash Pin
Member 1449096413-Dec-19 5:26
Member 1449096413-Dec-19 5:26 
AnswerRe: c# memory crash Pin
OriginalGriff13-Dec-19 5:42
mveOriginalGriff13-Dec-19 5:42 
GeneralRe: c# memory crash Pin
Member 1449096413-Dec-19 5:57
Member 1449096413-Dec-19 5:57 
AnswerRe: c# memory crash Pin
OriginalGriff13-Dec-19 6:03
mveOriginalGriff13-Dec-19 6:03 
GeneralRe: c# memory crash Pin
Eddy Vluggen13-Dec-19 6:04
professionalEddy Vluggen13-Dec-19 6:04 
GeneralRe: c# memory crash Pin
OriginalGriff13-Dec-19 6:12
mveOriginalGriff13-Dec-19 6:12 
GeneralRe: c# memory crash Pin
Eddy Vluggen13-Dec-19 6:13
professionalEddy Vluggen13-Dec-19 6:13 
GeneralRe: c# memory crash Pin
Eddy Vluggen13-Dec-19 6:13
professionalEddy Vluggen13-Dec-19 6:13 
GeneralRe: c# memory crash Pin
Member 1449096413-Dec-19 6:21
Member 1449096413-Dec-19 6:21 
GeneralRe: c# memory crash Pin
Eddy Vluggen13-Dec-19 6:24
professionalEddy Vluggen13-Dec-19 6:24 
GeneralRe: c# memory crash Pin
Richard Deeming13-Dec-19 6:31
mveRichard Deeming13-Dec-19 6:31 
GeneralRe: c# memory crash Pin
Eddy Vluggen13-Dec-19 7:12
professionalEddy Vluggen13-Dec-19 7:12 
GeneralRe: c# memory crash Pin
Member 1449096413-Dec-19 6:42
Member 1449096413-Dec-19 6:42 
GeneralRe: c# memory crash Pin
Eddy Vluggen13-Dec-19 7:11
professionalEddy Vluggen13-Dec-19 7:11 
AnswerRe: c# memory crash Pin
Luc Pattyn13-Dec-19 11:59
sitebuilderLuc Pattyn13-Dec-19 11:59 

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.