public Add ( string newWorkflowName ) : bool | ||
newWorkflowName | string | |
Résultat | bool |
public void CanFunctionNormallyWithMixedAddRemoveOdd() { NewWorkflowNames workflowNames = new NewWorkflowNames(); int cnt = 1; for(int i = cnt; i < 10; i++) { string name = "Unsaved " + i; workflowNames.Add(name); } for(int i = 1; i < 10; i += 2) { string name = "Unsaved " + i; workflowNames.Remove(name); } var next = workflowNames.GetNext(); Assert.AreEqual("Unsaved 1", next); }
public void NewWorkflowNamesGetNextNameWhenManyExistInHashSetAndGapAtTeoExpectedReturnNewWorkflow2() { NewWorkflowNames workflowNames = new NewWorkflowNames(); for(int i = 0; i < 5; i++) { string name = "Unsaved " + i; workflowNames.Add(name); } workflowNames.Remove("Unsaved 2"); Assert.AreEqual("Unsaved 2", workflowNames.GetNext()); }
public void NewWorkflowNamesGetNextNameWhenOneExistsInHashSetExpectedReturnNewWorkflow2() { NewWorkflowNames workflowNames = new NewWorkflowNames(); string name = "Unsaved 1"; workflowNames.Add(name); Assert.AreEqual("Unsaved 2", workflowNames.GetNext()); }
public void NewWorkflowNamesContainsNameWhenNameExistsInHashSetExpectedReturnOfTrue() { NewWorkflowNames workflowNames = new NewWorkflowNames(); string name = "Unsaved 1"; workflowNames.Add(name); Assert.IsTrue(workflowNames.Contains(name)); }
public void NewWorkflowNamesRemoveExistingNameFromHashSetExpectedNameToBeRemoved() { NewWorkflowNames workflowNames = new NewWorkflowNames(); string name = "Unsaved 1"; workflowNames.Add(name); workflowNames.Remove(name); Assert.IsFalse(workflowNames.Contains(name)); }
public void NewWorkflowNamesAddNewNameToHashSetExpectedNameToBeAdded() { NewWorkflowNames workflowNames = new NewWorkflowNames(); string name = "Unsaved 1"; workflowNames.Add(name); Assert.IsTrue(workflowNames.Contains(name)); }