public static global::ClassWithProtocol Create(string data_s, string data_c, int cases)
 {
   global::ClassWithProtocol classWithProtocol = new global::ClassWithProtocol();
   switch (cases)
   {
     case 1:
       classWithProtocol.Initialize(data_s);
       return classWithProtocol;
     case 2:
       classWithProtocol.Initialize(data_s);
       classWithProtocol.Compute(data_c);
       return classWithProtocol;
       
     default:
       return classWithProtocol;
   }
   // TODO: Edit factory method of ClassWithProtocol
   // This method should be able to configure the object in all possible ways.
   // Add as many parameters as needed,
   // and assign their values to each field by using the API.
 }
    public static global::ClassWithProtocol Create(string data_s, string data_c, int cases)
    {
        global::ClassWithProtocol classWithProtocol = new global::ClassWithProtocol();

        switch (cases)
        {
        case 1:
            classWithProtocol.Initialize(data_s);
            return(classWithProtocol);

        case 2:
            classWithProtocol.Initialize(data_s);
            classWithProtocol.Compute(data_c);
            return(classWithProtocol);

        default:
            return(classWithProtocol);
        }
        // TODO: Edit factory method of ClassWithProtocol
        // This method should be able to configure the object in all possible ways.
        // Add as many parameters as needed,
        // and assign their values to each field by using the API.
    }
Exemplo n.º 3
0
 public void Initialize([PexAssumeUnderTest] global::ClassWithProtocol target, string data)
 {
     // TODO: add assertions to method ClassWithProtocolTest.Initialize(ClassWithProtocol, String)
     target.Initialize(data);
 }