1
// Copyright (c) AlphaSierraPapa for the SharpDevelop Team (for details please see \doc\copyright.txt)
2
// This code is distributed under the GNU LGPL (for details please see \doc\license.txt)
5
using ICSharpCode.PythonBinding;
8
namespace PythonBinding.Tests.Expressions
11
/// Tests the PythonExpressionFinder's RemoveLastPart method.
14
public class RemoveLastPartTests
16
PythonExpressionFinder expressionFinder;
19
public void SetUpFixture()
21
expressionFinder = new PythonExpressionFinder();
25
public void NullString()
27
Assert.AreEqual(String.Empty, expressionFinder.RemoveLastPart(null));
31
public void EmptyString()
33
Assert.AreEqual(String.Empty, expressionFinder.RemoveLastPart(String.Empty));
37
/// Should remove the WriteLine part of the string.
40
public void SystemConsoleWriteLineString()
42
string expression = "System.Console.WriteLine";
43
Assert.AreEqual("System.Console", expressionFinder.RemoveLastPart(expression));