コード例 #1
0
    public void ShouldCalculateOhmLowWithTensionAndResitance_2()
    {
        var result = OhmLow.Calculate("50 Ohm et 2000 V");

        Assert.AreEqual("40 A", result);
    }
コード例 #2
0
    public void OnlyTowDigitAfterCommaShouldBeDisplayed()
    {
        var result = OhmLow.Calculate("10 V , 30 mA");

        Assert.AreEqual("333.33 Ohm", result);
    }
コード例 #3
0
    public void ShouldCalculateOhmLowWithTensionAndResitance()
    {
        var result = OhmLow.Calculate("100 V et 100 Ohm");

        Assert.AreEqual("1 A", result);
    }
コード例 #4
0
 public void IfCalculatingWithTensionAndZeroIntensityAnErrorShouldBeThrpwn()
 {
     Assert.Throws <OhmLawException>(() => OhmLow.Calculate("100 V et 0 A"));
 }
コード例 #5
0
    public void ShouldDealWithMegaOutput()
    {
        var result = OhmLow.Calculate("1 A , 10 MOhm");

        Assert.AreEqual("10 MV", result);
    }
コード例 #6
0
    public void ShouldReconizeExpressionWithComma()
    {
        var result = OhmLow.Calculate("1 A , 100 Ohm");

        Assert.AreEqual("100 V", result);
    }
コード例 #7
0
    public void ShouldDealWithDigitAfter0InInput()
    {
        var result = OhmLow.Calculate("5 A et 10 V");

        Assert.AreEqual("2 Ohm", result);
    }
コード例 #8
0
    public void ShouldDealWithDigitAfter0InOutput()
    {
        var result = OhmLow.Calculate("1 A , 100 Ohm");

        Assert.AreEqual("100 V", result);
    }
コード例 #9
0
    public void ShouldDealWithMicroInOutput()
    {
        var result = OhmLow.Calculate("1 A , 100 µOhm");

        Assert.AreEqual("100 µV", result);
    }
コード例 #10
0
    public void ShouldDealWithKiloInput()
    {
        var result = OhmLow.Calculate("5 mA et 10 kOhm");

        Assert.AreEqual("50 V", result);
    }
コード例 #11
0
    public void ShouldDealWithMegaInInput()
    {
        var result = OhmLow.Calculate("5 µA et 10 MOhm");

        Assert.AreEqual("50 V", result);
    }
コード例 #12
0
    public void ShouldDealWithNoPuissanceInInput()
    {
        var result = OhmLow.Calculate("100 V et 10 A");

        Assert.AreEqual("10 Ohm", result);
    }
コード例 #13
0
    public void ShouldDealWithMiliInInput()
    {
        var result = OhmLow.Calculate("5 nA et 10 mV");

        Assert.AreEqual("2 MOhm", result);
    }
コード例 #14
0
    public void ShouldCalculateOhmLowWithTensionAndIntensity_2()
    {
        var result = OhmLow.Calculate("5 A et 10 V");

        Assert.AreEqual("2 Ohm", result);
    }
コード例 #15
0
    public void ShouldCalculateOhmLowWithResistanceAndIntensity_2()
    {
        var result = OhmLow.Calculate("1 A et 100 Ohm");

        Assert.AreEqual("100 V", result);
    }
コード例 #16
0
    public void ShouldDealWithMiliInOutput()
    {
        var result = OhmLow.Calculate("1 mA , 100 Ohm");

        Assert.AreEqual("100 mV", result);
    }
コード例 #17
0
    public void ShouldCalculateOhmLowWithTensionAndIntensity()
    {
        var result = OhmLow.Calculate("100 V et 10 A");

        Assert.AreEqual("10 Ohm", result);
    }
コード例 #18
0
    public void ShouldDealWithNoPuissanceInOutput()
    {
        var result = OhmLow.Calculate("1 mA , 100 kOhm");

        Assert.AreEqual("100 V", result);
    }
コード例 #19
0
    public void nospaceshouldnotbeanerrorinexpressionreconization()
    {
        var result = OhmLow.Calculate("1A , 100Ohm");

        Assert.AreEqual("100 V", result);
    }
コード例 #20
0
    public void lotOfSpacesShouldNotbeAnErrorInExpressionReconization()
    {
        var result = OhmLow.Calculate("   1A  et   100Ohm ");

        Assert.AreEqual("100 V", result);
    }