public void find_by_project_when_project_is_published_by_a_single_template()
        {
            var theProject = new ProjectNuspec(new Project("Project1"), new NugetSpec("test", "test"));

            var t1 = new NuspecTemplate(new NugetSpec("MySpec", "MySpec.nuspec"), new[] { theProject });

            var collection = new NuspecTemplateCollection();
            collection.Add(t1);

            collection.FindByProject(theProject.Project).ShouldBeTheSameAs(t1);
        }
        public void find_by_project_when_project_is_published_by_multiple_templates_returns_null()
        {
            var theProject = new ProjectNuspec(new Project("Project1"), new NugetSpec("test", "test"));

            var t1 = new NuspecTemplate(new NugetSpec("MySpec", "MySpec.nuspec"), new[] { theProject });
            var t2 = new NuspecTemplate(new NugetSpec("MySpec.Silverlight", "MySpec.Silverlight.nuspec"), new[] { theProject });

            var collection = new NuspecTemplateCollection();
            collection.Add(t1, t2);

            collection.FindByProject(theProject.Project).ShouldBeNull();
        }
Exemple #3
0
 protected bool Equals(ProjectNuspec other)
 {
     return(_project.Equals(other._project) && _publishes.Equals(other._publishes));
 }
Exemple #4
0
 protected bool Equals(ProjectNuspec other)
 {
     return _project.Equals(other._project) && _publishes.Equals(other._publishes);
 }