Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Checkpoint: Can read/write from object blocks
- Loading branch information
Showing
33 changed files
with
787 additions
and
602 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,3 +23,4 @@ ripple_exe | |
*.gem | ||
Gemfile.lock | ||
src/ripple.Docs/pak-WebContent.zip | ||
*.orig |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,99 +1,73 @@ | ||
using FubuTestingSupport; | ||
using NUnit.Framework; | ||
using ripple.Commands; | ||
using ripple.Model; | ||
|
||
namespace ripple.Testing.Commands | ||
{ | ||
[TestFixture] | ||
public class InitInputTester | ||
{ | ||
private InitInput theInput; | ||
|
||
[SetUp] | ||
public void SetUp() | ||
{ | ||
theInput = new InitInput(); | ||
} | ||
|
||
private Solution theSolution { get { return theInput.ToSolution(); } } | ||
|
||
[Test] | ||
public void sets_the_name() | ||
{ | ||
theInput.Name = "Test"; | ||
theSolution.Name.ShouldEqual(theInput.Name); | ||
} | ||
|
||
[Test] | ||
public void default_src_folder() | ||
{ | ||
theSolution.SourceFolder.ShouldEqual("src"); | ||
} | ||
|
||
[Test] | ||
public void custom_src_folder() | ||
{ | ||
theInput.SourceFolderFlag = "source"; | ||
theSolution.SourceFolder.ShouldEqual(theInput.SourceFolderFlag); | ||
} | ||
|
||
[Test] | ||
public void default_nuspec_folder() | ||
{ | ||
theSolution.NugetSpecFolder.ShouldEqual("packaging/nuget"); | ||
} | ||
|
||
[Test] | ||
public void custom_nuspec_folder() | ||
{ | ||
theInput.NuspecFolderFlag = "nuspecs"; | ||
theSolution.NugetSpecFolder.ShouldEqual(theInput.NuspecFolderFlag); | ||
} | ||
|
||
[Test] | ||
public void default_build_command() | ||
{ | ||
theSolution.BuildCommand.ShouldEqual("rake"); | ||
} | ||
|
||
[Test] | ||
public void custom_build_command() | ||
{ | ||
theInput.BuildCommandFlag = "psake"; | ||
theSolution.BuildCommand.ShouldEqual(theInput.BuildCommandFlag); | ||
} | ||
|
||
[Test] | ||
public void default_fast_build_command() | ||
{ | ||
theSolution.FastBuildCommand.ShouldEqual("rake compile"); | ||
} | ||
|
||
[Test] | ||
public void custom_fast_build_command() | ||
{ | ||
theInput.FastBuildCommandFlag = "psake compile"; | ||
theSolution.FastBuildCommand.ShouldEqual(theInput.FastBuildCommandFlag); | ||
} | ||
|
||
[Test] | ||
public void default_feeds() | ||
{ | ||
theSolution.Feeds.ShouldHaveTheSameElementsAs(Feed.Fubu, Feed.NuGetV2); | ||
} | ||
|
||
[Test] | ||
public void custom_feeds() | ||
{ | ||
theInput.FeedsFlag = "test1#test2"; | ||
theSolution.Feeds.ShouldHaveTheSameElementsAs(new Feed("test1"), new Feed("test2")); | ||
} | ||
|
||
[Test] | ||
public void default_cache() | ||
{ | ||
theSolution.NugetCacheDirectory.ShouldBeNull(); | ||
} | ||
} | ||
using FubuTestingSupport; | ||
using NUnit.Framework; | ||
using ripple.Commands; | ||
using ripple.Model; | ||
|
||
namespace ripple.Testing.Commands | ||
{ | ||
[TestFixture] | ||
public class InitInputTester | ||
{ | ||
private InitInput theInput; | ||
|
||
[SetUp] | ||
public void SetUp() | ||
{ | ||
theInput = new InitInput(); | ||
} | ||
|
||
private Solution theSolution { get { return theInput.ToSolution(); } } | ||
|
||
[Test] | ||
public void sets_the_name() | ||
{ | ||
theInput.Name = "Test"; | ||
theSolution.Name.ShouldEqual(theInput.Name); | ||
} | ||
|
||
[Test] | ||
public void default_src_folder() | ||
{ | ||
theSolution.SourceFolder.ShouldEqual("src"); | ||
} | ||
|
||
[Test] | ||
public void custom_src_folder() | ||
{ | ||
theInput.SourceFolderFlag = "source"; | ||
theSolution.SourceFolder.ShouldEqual(theInput.SourceFolderFlag); | ||
} | ||
|
||
[Test] | ||
public void default_nuspec_folder() | ||
{ | ||
theSolution.NugetSpecFolder.ShouldEqual("packaging/nuget"); | ||
} | ||
|
||
[Test] | ||
public void custom_nuspec_folder() | ||
{ | ||
theInput.NuspecFolderFlag = "nuspecs"; | ||
theSolution.NugetSpecFolder.ShouldEqual(theInput.NuspecFolderFlag); | ||
} | ||
|
||
[Test] | ||
public void default_feeds() | ||
{ | ||
theSolution.Feeds.ShouldHaveTheSameElementsAs(Feed.Fubu, Feed.NuGetV2); | ||
} | ||
|
||
[Test] | ||
public void custom_feeds() | ||
{ | ||
theInput.FeedsFlag = "test1#test2"; | ||
theSolution.Feeds.ShouldHaveTheSameElementsAs(new Feed("test1"), new Feed("test2")); | ||
} | ||
|
||
[Test] | ||
public void default_cache() | ||
{ | ||
theSolution.NugetCacheDirectory.ShouldBeNull(); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,37 @@ | ||
using FubuTestingSupport; | ||
using NUnit.Framework; | ||
using ripple.Model; | ||
|
||
namespace ripple.Testing.Model | ||
{ | ||
[TestFixture] | ||
public class DependencyGroupTester | ||
{ | ||
[Test] | ||
public void has_dependency_positive() | ||
{ | ||
var group = new DependencyGroup(); | ||
group.Dependencies.Add(new GroupedDependency("FubuCore")); | ||
|
||
group.Has("FubuCore").ShouldBeTrue(); | ||
} | ||
|
||
[Test] | ||
public void has_dependency_case_insensitive() | ||
{ | ||
var group = new DependencyGroup(); | ||
group.Dependencies.Add(new GroupedDependency("FubuCore")); | ||
|
||
group.Has("fubuCore").ShouldBeTrue(); | ||
} | ||
|
||
[Test] | ||
public void has_dependency_negative() | ||
{ | ||
var group = new DependencyGroup(); | ||
group.Dependencies.Add(new GroupedDependency("FubuCore")); | ||
|
||
group.Has("Bottles").ShouldBeFalse(); | ||
} | ||
} | ||
using FubuTestingSupport; | ||
using NUnit.Framework; | ||
using ripple.Model; | ||
|
||
namespace ripple.Testing.Model | ||
{ | ||
[TestFixture] | ||
public class DependencyGroupTester | ||
{ | ||
[Test] | ||
public void has_dependency_positive() | ||
{ | ||
var group = new DependencyGroup(); | ||
group.Add(new GroupedDependency("FubuCore")); | ||
|
||
group.Has("FubuCore").ShouldBeTrue(); | ||
} | ||
|
||
[Test] | ||
public void has_dependency_case_insensitive() | ||
{ | ||
var group = new DependencyGroup(); | ||
group.Add(new GroupedDependency("FubuCore")); | ||
|
||
group.Has("fubuCore").ShouldBeTrue(); | ||
} | ||
|
||
[Test] | ||
public void has_dependency_negative() | ||
{ | ||
var group = new DependencyGroup(); | ||
group.Add(new GroupedDependency("FubuCore")); | ||
|
||
group.Has("Bottles").ShouldBeFalse(); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,34 @@ | ||
using NUnit.Framework; | ||
using ripple.Model; | ||
|
||
namespace ripple.Testing.Model | ||
{ | ||
[TestFixture] | ||
public class SolutionPersistence | ||
{ | ||
[Test] | ||
public void persists_and_retrieves_the_solution() | ||
{ | ||
var solution = new Solution | ||
{ | ||
Name = "Test", | ||
BuildCommand = "rake", | ||
FastBuildCommand = "rake compile", | ||
Feeds = new[] { Feed.NuGetV2, Feed.NuGetV1 }, | ||
Nugets = new[] { new Dependency("FubuCore", "1.0.1.0") } | ||
}; | ||
|
||
var group = new DependencyGroup(); | ||
group.Dependencies.Add(new GroupedDependency("FubuCore")); | ||
solution.Groups.Add(group); | ||
|
||
var constrainedDependency = new Dependency("Bottles", "1.0.0.0") | ||
{ | ||
VersionConstraint = VersionConstraint.DefaultFloat | ||
}; | ||
solution.AddDependency(constrainedDependency); | ||
|
||
solution.Nuspecs.Add(new NuspecMap { File = "Temp", Project = "Test"}); | ||
|
||
CheckXmlPersistence.For(solution); | ||
} | ||
} | ||
using NUnit.Framework; | ||
using ripple.Model; | ||
|
||
namespace ripple.Testing.Model | ||
{ | ||
[TestFixture] | ||
public class SolutionPersistence | ||
{ | ||
[Test] | ||
public void persists_and_retrieves_the_solution() | ||
{ | ||
var solution = new Solution | ||
{ | ||
Name = "Test", | ||
Feeds = new[] { Feed.NuGetV2, Feed.NuGetV1 }, | ||
Nugets = new[] { new Dependency("FubuCore", "1.0.1.0") } | ||
}; | ||
|
||
var group = new DependencyGroup(); | ||
group.Add(new GroupedDependency("FubuCore")); | ||
solution.AddGroup(group); | ||
|
||
var constrainedDependency = new Dependency("Bottles", "1.0.0.0") | ||
{ | ||
VersionConstraint = VersionConstraint.DefaultFloat | ||
}; | ||
solution.AddDependency(constrainedDependency); | ||
|
||
solution.AddNuspec(new NuspecMap { File = "Temp", Project = "Test" }); | ||
|
||
CheckXmlPersistence.For(solution); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.