public void SpatialOperationsThrowNotImplemented() { var operations = new BaseSpatialOperations(); var message = new NotImplementedException().Message; foreach (var method in typeof(SpatialOperations).GetMethods(BindingFlags.Instance | BindingFlags.Public).Where(m => m.DeclaringType != typeof(object))) { SpatialTestUtils.VerifyExceptionThrown <NotImplementedException>(() => this.InvokeOperation(operations, method), message); } }
public void SpatialOperationsRegistration() { var operations = new BaseSpatialOperations(); SpatialImplementation.CurrentImplementation.Operations = operations; Assert.True(SpatialImplementation.CurrentImplementation.Operations == operations, "Must be the same instance"); try { SpatialImplementation.CurrentImplementation.Operations = operations; } catch (ArgumentException e) { Assert.Equal("There are already operations registered with priority 0.3.", e.Message); } }
public void SpatialOperationsRegistration() { var operations = new BaseSpatialOperations(); SpatialImplementation.CurrentImplementation.Operations = operations; Assert.AreSame(SpatialImplementation.CurrentImplementation.Operations, operations, "Must be the same instance"); try { SpatialImplementation.CurrentImplementation.Operations = operations; } catch (ArgumentException e) { Assert.AreEqual("There are already operations registered with priority 0.3.", e.Message); } }