コード例 #1
0
    public override string Execute()
    {
        double value  = double.Parse(this.Arguments[0]);
        string result = providerController.Repair(value);

        return(result);
    }
コード例 #2
0
    public override string Execute()
    {
        double repairValue = double.Parse(Arguments[0]);
        var    result      = providerController.Repair(repairValue);

        return(result);
    }
コード例 #3
0
 public void RepairMethod(double val)
 {
     providerController.Register(new List <string> {
         "Standart", "10", "500"
     });
     providerController.Register(new List <string> {
         "Solar", "10", "500"
     });
     Assert.AreEqual(providerController.Repair(val), $"Providers are repaired by {val}");
 }
コード例 #4
0
    public void ReapirMethodValidation()
    {
        this.providerController.Register(new List <string>()
        {
            "Pressure", "40", "20"
        });

        IEntity provider           = this.providerController.Entities.First();
        double  expectedDurability = provider.Durability;

        double reapairValue = 150;

        providerController.Repair(reapairValue);

        double actualDurability = provider.Durability;

        Assert.AreNotEqual(expectedDurability, actualDurability);
    }
コード例 #5
0
    public override string Execute()
    {
        double value = double.Parse(Arguments[1]);

        return(providerController.Repair(value));
    }