public void Both_hostIds_for_paths_with_spaces_are_equal()
        {
            var information3 = new DefaultHostIdGenerator("\"pathto\\mysuper duper.exe\" \"somevar with spaces\"", "MyMachine");
            var information4 = new DefaultHostIdGenerator("\"pathto\\mysuper duper.exe\" somevar", "MyMachine");

            Assert.IsTrue(information3.HostId == information4.HostId);
        }
Beispiel #2
0
        static Guid GenerateDefaultHostId(out string fullPathToStartingExe)
        {
            var gen = new DefaultHostIdGenerator(Environment.CommandLine, RuntimeEnvironment.MachineName);

            fullPathToStartingExe = gen.FullPathToStartingExe;

            return gen.HostId;
        }
        public void HostId_is_parsed_from_path_with_spaces_having_a_parameter_without_spaces()
        {
            var information4 = new DefaultHostIdGenerator("\"pathto\\mysuper duper.exe\" somevar", "MyMachine");

            Assert.IsTrue(information4.HostId == Guid.Parse("{db3ff7ff-508f-cce7-0a8b-0092a7d750b9}"));
        }
        public void HostId_is_parsed_from_path_without_spaces_but_without_quotes()
        {
            var information2 = new DefaultHostIdGenerator("pathto\\mysuperduper.exe somevar", "MyMachine");

            Assert.IsTrue(information2.HostId == Guid.Parse("{8dd7bbcc-dfc3-d84a-41ac-82c14f1ed7db}"));
        }