public void GetAuthenticatedUserSettings_ExecuteQuery() { var fakeAccountSettingsDTO = A.Fake <IAccountSettingsDTO>(); var fakeAccountSettings = A.Fake <IAccountSettings>(); // Arrange var controller = CreateAccountController(); ArrangeGetAuthenticatedUserAccountSettings(fakeAccountSettingsDTO); _fakeAccountSettingsFactory.ArrangeGenerateParameterOverride <IAccountSettingsDTO, IAccountSettings>(); _fakeAccountSettingsFactory .CallsTo(x => x.Create( A <IConstructorNamedParameter> .That.Matches(p => p.Name == "accountSettingsDTO" && p.Value == fakeAccountSettingsDTO))) .Returns(fakeAccountSettings); // Act var result = controller.GetAuthenticatedUserSettings(); // Assert Assert.AreEqual(result, fakeAccountSettings); }