Skip to content

Commit

Permalink
(maint) formatted chocolatey.tests.integration
Browse files Browse the repository at this point in the history
  • Loading branch information
ferventcoder committed Jan 11, 2015
1 parent a10768d commit 9e56c06
Show file tree
Hide file tree
Showing 5 changed files with 88 additions and 14 deletions.
17 changes: 16 additions & 1 deletion src/chocolatey.tests.integration/MockEventSubscriptionManager.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,19 @@
namespace chocolatey.tests.integration
// Copyright © 2011 - Present RealDimensions Software, LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
//
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

namespace chocolatey.tests.integration
{
using System;
using System.Collections.Concurrent;
Expand Down
17 changes: 16 additions & 1 deletion src/chocolatey.tests.integration/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,19 @@
using System.Reflection;
// Copyright © 2011 - Present RealDimensions Software, LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
//
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

using System.Reflection;
using System.Runtime.InteropServices;

// General Information about an assembly is controlled through the following
Expand Down
19 changes: 17 additions & 2 deletions src/chocolatey.tests.integration/TODO.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,19 @@
namespace chocolatey.tests.integration
// Copyright © 2011 - Present RealDimensions Software, LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
//
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

namespace chocolatey.tests.integration
{
public class TODO
{
Expand All @@ -25,6 +40,6 @@ public class TODO
* New scenarios:
* - run happy path
*
*/
*/
}
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,19 @@
namespace chocolatey.tests.integration.infrastructure.commands
// Copyright © 2011 - Present RealDimensions Software, LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
//
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

namespace chocolatey.tests.integration.infrastructure.commands
{
using System;
using Should;
Expand All @@ -19,7 +34,7 @@ public class when_CommandExecutor_errors : CommandExecutorSpecsBase
{
private int result;
private string errorOutput;
private IFileSystem file_system = new DotNetFileSystem();
private readonly IFileSystem file_system = new DotNetFileSystem();

public override void Context()
{
Expand Down Expand Up @@ -60,7 +75,6 @@ public override void Because()
try
{
CommandExecutor.execute("noprocess.exe", "/c bob123123", ApplicationParameters.DefaultWaitForExitInSeconds, null, (s, e) => { errorOutput += e.Data; });

}
catch (Exception e)
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,19 @@
namespace chocolatey.tests.integration.infrastructure.filesystem
// Copyright © 2011 - Present RealDimensions Software, LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
//
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

namespace chocolatey.tests.integration.infrastructure.filesystem
{
using System;
using System.IO;
Expand Down Expand Up @@ -64,23 +79,23 @@ public void GetFiles_should_return_files_that_meet_the_pattern()
{
string filePath = FileSystem.combine_paths(ContextPath, "chocolateyInstall.ps1");

FileSystem.write_file(filePath,"yo");
FileSystem.write_file(filePath, "yo");
var actual = FileSystem.get_files(ContextPath, "chocolateyInstall.ps1", SearchOption.AllDirectories);
FileSystem.delete_file(filePath);

actual.ShouldNotBeEmpty();
actual.Count.ShouldEqual(1);
}
}

[Fact]
public void GetFiles_should_return_files_that_meet_the_pattern_regardless_of_case()
{
string filePath = FileSystem.combine_paths(ContextPath, "chocolateyInstall.ps1");

FileSystem.write_file(filePath,"yo");
FileSystem.write_file(filePath, "yo");
var actual = FileSystem.get_files(ContextPath, "chocolateyinstall.ps1", SearchOption.AllDirectories);
FileSystem.delete_file(filePath);

actual.ShouldNotBeEmpty();
actual.Count.ShouldEqual(1);
}
Expand Down

0 comments on commit 9e56c06

Please sign in to comment.