public void Delete() { // Arrange SettingsController controller = new SettingsController(); // Act controller.Delete(5); // Assert }
public void SettingsControllerConflict() { var settings = Mock.Of <IDeploymentSettingsManager>(); var operationLock = new Mock <IOperationLock>(); // setup operationLock.Setup(l => l.Lock()) .Returns(false); var controller = new SettingsController(settings, operationLock.Object) { Request = new HttpRequestMessage() }; var response = controller.Set(new JObject()); Assert.Equal(HttpStatusCode.Conflict, response.StatusCode); response = controller.Delete("dummy"); Assert.Equal(HttpStatusCode.Conflict, response.StatusCode); }