public void StrategyStartsInstanceIfItIsStartable() { var instance = new StartableObject(); var reference = new InstanceReference { Instance = instance }; strategy.Activate(contextMock.Object, reference); instance.WasStarted.Should().BeTrue(); }
public void StrategyStartsInstanceIfItIsStartable() { var instance = new StartableObject(); contextMock.SetupGet(x => x.Instance).Returns(instance); strategy.Activate(contextMock.Object); instance.WasStarted.ShouldBeTrue(); }
public void StrategyStartsInstanceIfItIsStartable() { var instance = new StartableObject(); var reference = new InstanceReference { Instance = instance }; this.strategy.Activate(this.contextMock.Object, reference); instance.WasStarted.Should().BeTrue(); }
public void StrategyStopsInstanceIfItIsStartable() { var instance = new StartableObject(); var reference = new InstanceReference { Instance = instance }; strategy.Deactivate(contextMock.Object, reference); instance.WasStopped.Should().BeTrue(); }