zoukankan      html  css  js  c++  java
  • TestForGit

     1 public class Colculter {
     2     public double sum(double a,double b){
     3         return a+b;
     4     }
     5     public double substract(double a,double b){
     6         return a-b;
     7     }
     8     public double divide(double a,double b){
     9         return a/b;
    10     }
    11     public double aulitply(double a,double b){
    12         return a*b;
    13     }
    14 }
    public class ColculterTest {
        private Colculter mColculter;
        @Before
        public void setUp() throws Exception {
            mColculter = new Colculter();
    
        }
        @After
        public void tearDown() throws Exception{
    
        }
    
        @Test
        public void sum() throws Exception {
            assertEquals(8d,mColculter.sum(3d,5d),0);
    
        }
    
        @Test
        public void substract() throws Exception {
            assertEquals(1d,mColculter.substract(5d,4d),0);
    
        }
    
        @Test
        public void divide() throws Exception {
            assertEquals(4d,mColculter.divide(20d,5d),0);
    
        }

  • 相关阅读:
    无缝轮播图
    瀑布流之ajax
    进阶版轮播图
    桌面特效
    3D模型文字动画
    Razor 常用方法
    easyui常用
    C#
    Redis设置记录
    日志三剑客ELK
  • 原文地址:https://www.cnblogs.com/u1118733/p/6563711.html
Copyright © 2011-2022 走看看