private void DoGetSubKeyStringTest(string subkey, ComponentPresence subKeyPresence, string expectedResult) { // Arrange var mock = new Mock <DirectiveHandler>(); mock.Setup(h => h.SubKey).Returns(subKeyPresence); DirectiveHandler sut = mock.Object; // Act string result = sut.GetSubKeyString(subkey); // Assert Assert.AreEqual(expectedResult, result); }