public void SumTwoNumber_ValueSameAsInput() { string exp = "2+a"; var formol = new FormoleTabdil(exp); Assert.AreEqual(exp, formol.Value); }
public void Proccess_Braces_12() { string exp = "(a+2)*3"; var formol = new FormoleTabdil(exp); var result = FormolProccessor.Proccess(formol, 2); Assert.AreEqual(12, result); }
public void Proccess_Braces_8() { string exp = "a+(2*3)"; var formol = new FormoleTabdil(exp); var result = FormolProccessor.Proccess(formol, 2); Assert.AreEqual(8, result); }
public void Proccess_aDivision2_4() { string exp = "a/2"; var formol = new FormoleTabdil(exp); var result = FormolProccessor.Proccess(formol, 8); Assert.AreEqual(4, result); }
public void Proccess_aMultiple2_8() { string exp = "a*2"; var formol = new FormoleTabdil(exp); var result = FormolProccessor.Proccess(formol, 4); Assert.AreEqual(8, result); }
public void Proccess_aPlus2_4() { string exp = "a+2"; var formol = new FormoleTabdil(exp); var result = FormolProccessor.Proccess(formol, 2); Assert.AreEqual(4, result); }
public void VahedeSanjesheFormoldar_KelvinToFahrenheit_32_27315() { BodeAndazeGiri bod = new BodeAndazeGiri("بعد1", "b1"); FormoleTabdil formoleTabdilKelvinBPaye = new FormoleTabdil("a-273.15"); FormoleTabdil formoleTabdilKelvinAzPaye = new FormoleTabdil("a+273.15"); VahedeSanjesheFormoldar VahedeSanjesheKelvin = new VahedeSanjesheFormoldar("کلوین", "Kelvin", "K", bod, formoleTabdilKelvinAzPaye, formoleTabdilKelvinBPaye); FormoleTabdil formoleTabdilFahrenheitBPaye = new FormoleTabdil("(a-32)*5/9"); FormoleTabdil formoleTabdilFahrenheitAzPaye = new FormoleTabdil("(a*9/5)+32"); VahedeSanjesheFormoldar VahedeSanjesheFahrenheit = new VahedeSanjesheFormoldar("فارنهایت", "Fahrenheit", "K", bod, formoleTabdilFahrenheitAzPaye, formoleTabdilFahrenheitBPaye); double resultInKelvin = VahedeSanjesheConvertor.Convert(32, VahedeSanjesheFahrenheit, VahedeSanjesheKelvin); Assert.AreEqual(273.15, resultInKelvin); }
public VahedeSanjesheFormoldar(string nameFarsi, string nameEnglish, string symbol, BodeAndazeGiri bod, FormoleTabdil formoleTabdilAzVahedePaye, FormoleTabdil formoleTabdilBeVahedePaye) : base(nameFarsi, nameEnglish, symbol, bod) { FormoleTabdilAzVahedePaye = formoleTabdilAzVahedePaye; FormoleTabdilBeVahedePaye = formoleTabdilBeVahedePaye; }