예제 #1
0
        public void UnregisterPackageFolder_should_unregister_tools_and_lib_if_tools_does_not_exist_and_lib_does_not_exist()
        {
            using (var tools = new DirectoryInfo(Utility.Tools).BeginModifying())
            using (var lib = new DirectoryInfo(Utility.Lib).BeginModifying())
            {
                // Arrange
                var envRepos = new EnvironmentRepository();

                // Act
                envRepos.UnregisterPackageFolder();

                // Assert
                Assert.IsFalse(tools.Info.Exists);
                Assert.IsFalse(lib.Info.Exists);
            }
        }
예제 #2
0
        public void UnregisterPackageFolder_should_unregister_tools_and_lib_if_tools_does_not_exist_and_lib_exists()
        {
            using (var tools = new DirectoryInfo(Utility.Tools).BeginModifying())
            using (var lib = new DirectoryInfo(Utility.Lib).BeginModifying())
            {
                // Arrange
                var fixture = new Fixture().Customize(new AutoMoqCustomization());
                
                new DirectoryInfo(Utility.Lib).CreateWithContent(fixture);

                var envRepos = new EnvironmentRepository();

                // Act
                envRepos.UnregisterPackageFolder();

                // Assert
                Assert.IsFalse(tools.Info.Exists);
                Assert.IsFalse(lib.Info.Exists);
            }
        }