Ejemplo n.º 1
0
            public void IfProcessNotInList_StillWorks()
            {
                var processKey = Guid.NewGuid();
                var process    = Substitute.For <IProcess>();

                var result = ProcessTracker.RemoveProcess(processKey);

                Assert.False(result);
            }
Ejemplo n.º 2
0
            public void RemovesProcessFromList()
            {
                var processKey = Guid.NewGuid();
                var process    = Substitute.For <IProcess>();

                ProcessTracker.TrackProcess(processKey, process);
                Assert.NotNull(ProcessTracker.GetProcessByKey(processKey));

                var result = ProcessTracker.RemoveProcess(processKey);

                Assert.True(result);
                Assert.Null(ProcessTracker.GetProcessByKey(processKey));
            }