Пример #1
0
 public void package_removed_from_both_repositories()
 {
     SpecExtensions.ShouldBeEmpty <PackageDependency>(PostCommandDescriptor.Dependencies
                                                      .Where(x => x.Name == "galdalf"));
     Environment.SystemRepository.PackagesByName["gandalf"]
     .ShouldBeEmpty();
 }
Пример #2
0
        public void values_are_parsed()
        {
            var values = SpecExtensions.ShouldBeOfType <MultiValueInput>(Result.Single()).Values;

            SpecExtensions.ShouldBe <string>(values.ElementAt(0), _expectedFirst);
            SpecExtensions.ShouldBe <string>(values.ElementAt(1), _expectedSecond);
            SpecExtensions.ShouldBe <string>(values.ElementAt(2), _expectedThird);
        }
Пример #3
0
        public void cannot_be_moved(FileShare fileShare)
        {
            var tempFile = FileSystem.CreateTempFile();

            using (var openStream = tempFile.Open(FileMode.Append, FileAccess.Write, fileShare))
            {
                SpecExtensions.ShouldThrow <IOException>(Executing(() => tempFile.MoveTo(tempFile.Parent.GetFile(Guid.NewGuid().ToString()))));
            }
        }
Пример #4
0
 public void should_have_multiple_values()
 {
     SpecExtensions.ShouldHaveCountOf <string>(Result.Single().ShouldBeOfType <MultiValueInput>().Values, 3);
 }
Пример #5
0
 public void descriptor_file_is_not_updated()
 {
     SpecExtensions.ShouldBeNull <PackageDependency>(PostExecutionDescriptor.Dependencies.FirstOrDefault(x => x.Name == "sauron"));
 }
Пример #6
0
 public void descriptor_is_not_updated()
 {
     SpecExtensions.ShouldBeNull <PackageDependency>(Environment.Descriptor.Dependencies.FirstOrDefault(x => x.Name == "sauron"));
 }
Пример #7
0
 protected void should_not_match(string versionvertice, string version)
 {
     SpecExtensions.ShouldBeFalse(CreateVertex(versionvertice)
                                  .IsCompatibleWith(version.ToVersion()));
 }