public void WriteSolution_NoCredentials_FileSavedOk() { // Arrange SetSolutionFilePath(@"c:\mysolutionfile.foo"); var expectedFilePath = @"c:\.sonarlint\mysolutionfile.sqconfig"; var boundProject = new BoundSonarQubeProject { ProjectKey = "mykey", ServerUri = new Uri("http://localhost:9000"), }; // Act var actualFilePath = testSubject.WriteSolutionBinding(boundProject); // Assert actualFilePath.Should().Be(expectedFilePath); fileMock.Verify(x => x.WriteAllText(expectedFilePath, It.IsAny <string>()), Times.Once); var savedCredentials = configurableStore.ReadCredentials(new Uri("http://localhost:9000")); savedCredentials.Should().BeNull(); }