This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| namespace System.IO.Abstractions.TestingHelpers | |
| { | |
| [Serializable] | |
| public class MockFileSystem : IFileSystem, IMockFileDataAccessor | |
| { | |
| #region Implementation of IFileSystem | |
| #endregion | |
| public IEnumerable<string> AllPaths |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [TestFixture] | |
| public class FileCopierTests | |
| { | |
| [Test] | |
| public void CopyFile_SourceFileExistsDestinationDirDoesNotExist_DestinationFileCopied() | |
| { | |
| // Arrange | |
| var mockFileSystem = new MockFileSystem(); | |
| mockFileSystem.AddFile(@"c:\file.txt", MockFileData.NullObject); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Set-ExplorerOptions -showHidenFilesFoldersDrives -showProtectedOSFiles -showFileExtensions | |
| Enable-RemoteDesktop | |
| choco install vmware-tools -y | |
| choco install google-chrome-x64 -y | |
| choco install git-tf -y |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class TeamFoundationAnnotationRetriever | |
| { | |
| private readonly Regex m_Regex = new Regex(@"^(?<changeset>\d+)(?<codeLine>.*)", RegexOptions.Compiled | RegexOptions.Multiline); | |
| public List<Changeset> GetAnnotations(string filepath, string codeText) | |
| { | |
| var versionControlServer = CreateVersionControlServer(); | |
| return m_Regex.Matches(ExecutePowerTools(filepath)) | |
| .Cast<Match>() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var builds = new RemoteTc() | |
| .Connect(_ => _.ToHost("teamcity.codebetter.com").AsGuest()) | |
| .GetBuilds(_ => _.BuildConfiguration(__ => __.Id("FluentTc"))); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var builds = new RemoteTc() | |
| .Connect(_ => _.ToHost("teamcity.codebetter.com").AsGuest()) | |
| .GetBuilds(_ => _.BuildConfiguration(__ => __.Id("FluentTc")), | |
| _ => _.IncludeStartDate().IncludeFinishDate()); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var builds = new RemoteTc() | |
| .Connect(_ => _.ToHost("teamcity.codebetter.com").AsGuest()) | |
| .GetBuilds(_ => _.BuildConfiguration(__ => __.Id("FluentTc")), | |
| _ => _.Start(20).Count(10), | |
| _ => _.IncludeStartDate().IncludeFinishDate()); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var builds = new RemoteTc() | |
| .Connect(_ => _.ToHost("teamcity.codebetter.com").AsGuest()) | |
| .GetBuilds(_ => | |
| _.NotPersonal() | |
| .Pinned() | |
| .Status(BuildStatus.Success) | |
| .SinceDate(DateTime.Now.AddDays(-1)) | |
| .BuildConfiguration(__ => __.Id("FluentTc"))); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [TestFixture] | |
| public class SerializationTests | |
| { | |
| [Serializable] | |
| public class Serial | |
| { | |
| public string Name { get; set; } | |
| } | |
| [Test] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [Test] | |
| public void Serial_DataContractSerializable() | |
| { | |
| var serial = new Serial(); | |
| serial.Should().BeDataContractSerializable(); | |
| } |