GitHup地址:https://github.com/StrawberryWithChocolate/junit-Calculator-Test

代码例子:单元测试加减乘除法

package junittest;


public class MyTest {


    private int result;
    
    public void add(int a, int b)
    {
        result = a + b ;
    }
    
    public void substract(int a, int b)
    {
        result = a - b ;
    }
    
    
    public void multipuly(int a,int b)   
    {
   
    }
    
    public void divide(int a,int b)
    {
    result = a/b ;
    }
    
    public void square(int a)
    {
    result = a*a ;
    }
    
    public void clear()
    {
    result = 0 ;
    }
    
    public void output()
    {
    System.out.println("test success");
    }
    
    
    public int getresult()
    {
        return result;
    }
    
}

GitHup的建立与使用

合并冲突时遇到的问题:签入时没有将githup中相应的地址在eclipse中做出修改导致签入失败。

相关文章:

  • 2021-04-18
  • 2021-10-14
  • 2021-11-11
  • 2021-06-21
  • 2021-04-30
  • 2021-12-16
  • 2021-07-20
  • 2021-06-27
猜你喜欢
  • 2021-09-24
  • 2021-04-03
  • 2022-01-08
  • 2021-10-16
  • 2021-11-28
  • 2021-11-26
  • 2021-12-27
相关资源
相似解决方案