SEBWIN-219: Forgot test case for DelegateOperation.
This commit is contained in:
		
							parent
							
								
									5a830bad42
								
							
						
					
					
						commit
						b206b0d5be
					
				
					 1 changed files with 15 additions and 0 deletions
				
			
		|  | @ -7,6 +7,7 @@ | |||
|  */ | ||||
| 
 | ||||
| using Microsoft.VisualStudio.TestTools.UnitTesting; | ||||
| using SafeExamBrowser.Contracts.Behaviour.OperationModel; | ||||
| using SafeExamBrowser.Core.Behaviour.OperationModel; | ||||
| 
 | ||||
| namespace SafeExamBrowser.Core.UnitTests.Behaviour.OperationModel | ||||
|  | @ -49,5 +50,19 @@ namespace SafeExamBrowser.Core.UnitTests.Behaviour.OperationModel | |||
| 
 | ||||
| 			Assert.IsTrue(reverted); | ||||
| 		} | ||||
| 
 | ||||
| 		[TestMethod] | ||||
| 		public void MustNotFailIfActionsAreNull() | ||||
| 		{ | ||||
| 			var sut = new DelegateOperation(null, null, null); | ||||
| 
 | ||||
| 			var perform = sut.Perform(); | ||||
| 			var repeat = sut.Repeat(); | ||||
| 
 | ||||
| 			sut.Revert(); | ||||
| 
 | ||||
| 			Assert.AreEqual(OperationResult.Success, perform); | ||||
| 			Assert.AreEqual(OperationResult.Success, repeat); | ||||
| 		} | ||||
| 	} | ||||
| } | ||||
|  |  | |||
		Loading…
	
	Add table
		
		Reference in a new issue
	
	 dbuechel
						dbuechel