public void TestParseMethodDescription_InvalidMethodName() { string method; string scope; int? version; VersionedOperationCatalog.ParseMethodDescription("$:S:1", out method, out scope, out version); }
public void TestClear_NotEmpty_ToBeEmpty() { var target = new VersionedOperationCatalog(); target.Add(CreateOperation("M", "S", 1)); target.Clear(); Assert.That(target.Contains("M:S:1"), Is.False); }
public void TestParseMethodDescription_HexVersion() { string method; string scope; int? version; VersionedOperationCatalog.ParseMethodDescription("M:S:-1", out method, out scope, out version); }
private static bool TestAddCore(OperationDescription adding, params OperationDescription[] existents) { var target = new VersionedOperationCatalog(); foreach (var existent in existents) { Assert.That(target.Add(existent), "Failed to add existent '{0}'.", existent); } return(target.Add(adding)); }
public void TestParseMethodDescription_ScopeAndVersionIsOmitted_Ok() { string method; string scope; int? version; VersionedOperationCatalog.ParseMethodDescription("M", out method, out scope, out version); Assert.That(method, Is.EqualTo("M")); Assert.That(scope, Is.Null); Assert.That(version, Is.Null); }
public void TestParseMethodDescription_AllSpec_Ok() { string method; string scope; int? version; VersionedOperationCatalog.ParseMethodDescription("M:S:1", out method, out scope, out version); Assert.That(method, Is.EqualTo("M")); Assert.That(scope, Is.EqualTo("S")); Assert.That(version, Is.EqualTo(1)); }
// Depends on Add private static VersionedOperationCatalog GetTestTarget() { var result = new VersionedOperationCatalog(); result.Add(CreateOperation("Method", String.Empty, 1)); result.Add(CreateOperation("Method", String.Empty, 2)); result.Add(CreateOperation("Method_", String.Empty, 1)); result.Add(CreateOperation("Method_", String.Empty, 2)); result.Add(CreateOperation("Method", "Scope_", 1)); result.Add(CreateOperation("Method", "Scope_", 2)); result.Add(CreateOperation("Method_", "Scope_", 1)); result.Add(CreateOperation("Method_", "Scope_", 2)); result.Add(CreateOperation("Method", "Scope", 1)); result.Add(CreateOperation("Method", "Scope", 2)); result.Add(CreateOperation("Method_", "Scope", 1)); result.Add(CreateOperation("Method_", "Scope", 2)); return(result); }
public void TestClear_NotEmpty_ToBeEmpty() { var target = new VersionedOperationCatalog(); target.Add( CreateOperation( "M", "S", 1 ) ); target.Clear(); Assert.That( target.Contains( "M:S:1" ), Is.False ); }
// Depends on Add private static VersionedOperationCatalog GetTestTarget() { var result = new VersionedOperationCatalog(); result.Add( CreateOperation( "Method", String.Empty, 1 ) ); result.Add( CreateOperation( "Method", String.Empty, 2 ) ); result.Add( CreateOperation( "Method_", String.Empty, 1 ) ); result.Add( CreateOperation( "Method_", String.Empty, 2 ) ); result.Add( CreateOperation( "Method", "Scope_", 1 ) ); result.Add( CreateOperation( "Method", "Scope_", 2 ) ); result.Add( CreateOperation( "Method_", "Scope_", 1 ) ); result.Add( CreateOperation( "Method_", "Scope_", 2 ) ); result.Add( CreateOperation( "Method", "Scope", 1 ) ); result.Add( CreateOperation( "Method", "Scope", 2 ) ); result.Add( CreateOperation( "Method_", "Scope", 1 ) ); result.Add( CreateOperation( "Method_", "Scope", 2 ) ); return result; }
private static bool TestAddCore( OperationDescription adding, params OperationDescription[] existents ) { var target = new VersionedOperationCatalog(); foreach ( var existent in existents ) { Assert.That( target.Add( existent ), "Failed to add existent '{0}'.", existent ); } return target.Add( adding ); }