public void IsZero_1() { TEditor testClass = new TEditor(); testClass.WriteString("14/3"); Assert.IsFalse(testClass.IsZero()); }
public void IsZero_2() { TEditor testClass = new TEditor(); testClass.WriteString("0/11"); Assert.IsTrue(testClass.IsZero()); }
public void IsZero_2() { TEditor testClass = new TEditor(); testClass.WriteNumber("0,+i*0,"); Assert.IsTrue(testClass.IsZero()); }
public void IsZero_1() { TEditor testClass = new TEditor(); testClass.WriteNumber("12,36+i*12,35"); Assert.IsFalse(testClass.IsZero()); }
void Init(Context context) { _richTextEditor = new TEditor(); this.SetWebViewClient(new TEditorWebViewClient(_richTextEditor)); this.SetWebChromeClient(new TEditorChromeWebClient()); _richTextEditor.SetJavaScriptEvaluatingFunction((input) => { this.EvaluateJavascript(input, null); }); _richTextEditor.SetJavaScriptEvaluatingWithResultFunction((input) => { var activity = context as Activity; JavaScriptResult result = new JavaScriptResult(); this.EvaluateJavascript(input, result); if (activity != null) { activity.RunOnUiThread(() => { }); } return(result.GetResultAsync()); }); _colorPickerDialog = new ColorPickerDialog(context, Color.Red); _colorPickerDialog.ColorChanged += (o, args) => { _richTextEditor.SetTextColor((int)args.Color.R, (int)args.Color.G, (int)args.Color.B); }; _richTextEditor.LaunchColorPicker = () => { _colorPickerDialog.Show(); }; this.LoadResource(); }
public void Init_And_Output_1() { TEditor testClass = new TEditor(); string output = "10,3+i*0,8"; testClass.WriteNumber(output); Assert.AreEqual(output, testClass.ReadNumber()); }
public void IsZeroGood() { TEditor edit = new TEditor(); bool expected = true; bool result = edit.IsZero(); Assert.AreEqual(expected, result); }
public void ConstructurZeroGood() { TEditor edit = new TEditor(); string expected = "0,0"; string result = edit.GetNumber(); Assert.AreEqual(expected, result); }
public void ConstructurNumberBCFail() { TEditor edit = new TEditor("16,3", 1, 1); string expected = "0,0"; string result = edit.GetNumber(); Assert.AreEqual(expected, result); }
public void ClearGood() { TEditor edit = new TEditor("16,3", 16, 1); string expected = "0,0"; string result = edit.Clear(); Assert.AreEqual(expected, result); }
public void AddSignoGood() { TEditor edit = new TEditor("16,16", 16, 2); string expected = "-16,16"; string result = edit.AddSign(); Assert.AreEqual(expected, result); }
public void AddZeroGood() { TEditor edit = new TEditor("16,0", 16, 1); string expected = "160,0"; string result = edit.AddZero(); Assert.AreEqual(expected, result); }
public void ConstructurNumberBCGood() { TEditor edit = new TEditor("16,16", 16, 2); string expected = "16,16"; string result = edit.GetNumber(); Assert.AreEqual(expected, result); }
public void Init_And_Output_2() { TEditor testClass = new TEditor(); string output = "-12,6-i*66,2"; testClass.WriteNumber(output); Assert.AreEqual(output, testClass.ReadNumber()); }
public void ClearFail() { TEditor edit = new TEditor("0,0", 16, 1); string expected = "0,0"; string result = edit.BackSpace(); Assert.AreEqual(expected, result); }
public void SetNumberFail() { TEditor edit = new TEditor("110,0", 10, 1); string expected = "110,0"; string result = edit.SetNumber("1A,2B"); Assert.AreEqual(expected, result); }
public void BackSpaceFail() { TEditor edit = new TEditor("-16,3345", 16, 4); string expected = "-16,334"; string result = edit.BackSpace(); Assert.AreEqual(expected, result); }
public void AddZeroFail() { TEditor edit = new TEditor("-16,3", 16, 1); string expected = "-16,3"; string result = edit.AddZero(); Assert.AreEqual(expected, result); }
public void IsZeroFail() { TEditor edit = new TEditor("16,3", 16, 1); bool expected = false; bool result = edit.IsZero(); Assert.AreEqual(expected, result); }
public void GetNumberGood() { TEditor edit = new TEditor("16,3", 16, 1); string expected = "16,3"; string result = edit.GetNumber(); Assert.AreEqual(expected, result); }
public void BackSpaceGood() { TEditor edit = new TEditor("16,3", 16, 1); string expected = "16,0"; string result = edit.BackSpace(); Assert.AreEqual(expected, result); }
static void Main(string[] args) { TEditor edit = new TEditor("110,0", 13, 1); string expected = "110,0"; string result = edit.SetNumber("1A,2B"); Console.WriteLine(result); }
public void Init_And_Output_1() { TEditor testClass = new TEditor(); string output = "3/4"; testClass.WriteString(output); Assert.AreEqual(output, testClass.ReadString()); }
public void AddNumber_2() { TEditor testClass = new TEditor(); testClass.WriteNumber("-25,6-i*44,44"); testClass.AddNumber(0); string output = "-250,6-i*44,44"; Assert.AreEqual(output, testClass.ReadNumber()); }
public void DelNumber_1() { TEditor testClass = new TEditor(); testClass.WriteString("42/3"); testClass.DelSymbol(); string output = "42/3"; Assert.AreEqual(output, testClass.ReadString()); }
public void AddNumber_2() { TEditor testClass = new TEditor(); testClass.WriteString("0/1"); testClass.AddNumber(4); string output = "4/1"; Assert.AreEqual(output, testClass.ReadString()); }
public void ToggleMinus_2() { TEditor testClass = new TEditor(); testClass.WriteString("-3/4"); testClass.ToggleMinus(); string output = "3/4"; Assert.AreEqual(output, testClass.ReadString()); }
public void ToggleMinus_2() { TEditor testClass = new TEditor(); testClass.WriteNumber("-12,36+i*12,35"); testClass.ToggleMinus(); string output = "12,36+i*12,35"; Assert.AreEqual(output, testClass.ReadNumber()); }
public void AddNumber_1() { TEditor testClass = new TEditor(); testClass.WriteNumber("0,36+i*1,4"); testClass.AddNumber(4); string output = "4,36+i*1,4"; Assert.AreEqual(output, testClass.ReadNumber()); }
public void Clear() { TEditor testClass = new TEditor(); testClass.WriteString("42/34"); testClass.Clear(); string output = "0/1"; Assert.AreEqual(output, testClass.ReadString()); }