Vikram N

Vikram N

  • NA
  • 66
  • 19.5k

NUnit Testing

Dec 4 2013 1:57 AM
Hello All,
I am supposed to write NUnit Test Cases for the below method. Can anyone tell me how do I assign a value for the below scenario?

 [Test]
        public void method_Test()
        {
Animal animal = null;    //how to assign the value?    
bool isHerbivore = false;
CategorizeAnimal ca  = new CategorizeAnimal(animal,isHerbivore); // TODO: Initialize to an appropriate value
        int expected = 0; // TODO: Initialize to an appropriate value
        int actual;
        actual = ca.getProcedureDuration();
         NUnit.Framework.Assert.AreEqual(expected, actual);
         NUnit.Framework.Assert.Inconclusive("Verify the correctness of this test method.");
        }

public class Animal
{
[DataMember]
public int numOfLegs;
[DataMember]
public EnumValue color;
}

The question is:
How do I assign a value for the object animal?
Please Help :)


Answers (2)