public void TestExitOnAgentDisabled() { this.settings.SetupGet(a => a.Enabled).Returns(false); LapsAgent agent = this.BuildAgent(); agent.DoCheck(); settings.VerifyGet(t => t.Enabled); settings.VerifyGet(t => t.WriteToLithnetAttributes, Times.Never); }
public void TestExitOnAgentDisabled() { this.settings.SetupGet(a => a.Enabled).Returns(false); LapsAgent agent = this.BuildAgent(); agent.DoCheck(); settings.VerifyGet(t => t.Enabled); settings.VerifyGet(t => t.MsMcsAdmPwdBehaviour, Times.Never); }
public void TestExitOnNoPasswordProvidersEnabled() { this.settings.SetupGet(a => a.Enabled).Returns(true); this.settings.SetupGet(a => a.WriteToLithnetAttributes).Returns(false); this.settings.SetupGet(a => a.WriteToMsMcsAdmPasswordAttributes).Returns(false); LapsAgent agent = this.BuildAgent(); agent.DoCheck(); settings.VerifyGet(t => t.Enabled); directory.Verify(t => t.GetComputer(It.IsAny <string>()), Times.Never); }