func TestResolution3(t *testing.T) {
	Convey("Testing very basic dependency of one library on another", t, func(c C) {
		var index Resolver = NewLibraryGraph()
		err := deps(index, "Root:1.0.0", "A:1.0.0")
		NoError(c, err)
		config, err := index.Resolve("Root")
		NoError(c, err)
		testConfig(config, c, "Root:1.0.0")
	})
}
/* Simple Case: Root 1.0.0 depends on A 1.0.0
package graph
import (
	"fmt"
	"strings"
	"testing"
	"github.com/impact/impact/parsing"
	"github.com/blang/semver"
	. "github.com/smartystreets/goconvey/convey"
	. "github.com/xogeny/xconvey"
)
func parse(libs string) (LibraryName, semver.Version) {
	parts := strings.Split(libs, ":")
	if len(parts) != 2 {
		panic(fmt.Errorf("Invalid library spec: %s", libs))
	}
	v, err := semver.Parse(parts[1])
	if err != nil {
		panic(err)
	}
	return LibraryName(parts[0]), v
}
func deps(index Resolver, libs string, deps ...string) error {
	lib, libver := parse(libs)
	index.AddLibrary(lib, libver)
	for _, ds := range deps {
		dep, depver := parse(ds)
		if !index.Contains(dep, depver) {
			index.AddLibrary(dep, depver)
		}
		err := index.AddDependency(lib, libver, dep, depver)
		if err != nil {
			return err
		}
	}
	return nil
}
func testConfig(config Configuration, c C, vers ...string) {
	for _, v := range vers {
		lib, libver := parse(v)
		cver, exists := config[lib]
		IsTrue(c, exists)
		if exists {
			Equals(c, 0, cver.Compare(libver))
		}
	}
}