Exemplo n.º 1
0
    public bool Compute([PexAssumeUnderTest] global::ClassWithProtocol target, string prefix)
    {
        // TODO: add assertions to method ClassWithProtocolTest.Compute(ClassWithProtocol, String)
        bool result = target.Compute(prefix);

        return(result);
    }
 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.
    }