-
Notifications
You must be signed in to change notification settings - Fork 260
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
DeploymentItem: add test for file deployment using Windows/Linux path… (
- Loading branch information
1 parent
14b6245
commit 0ee0586
Showing
2 changed files
with
39 additions
and
0 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
27 changes: 27 additions & 0 deletions
27
test/IntegrationTests/TestAssets/DeploymentTestProject.PreserveNewest/FileDeploymentTests.cs
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 |
---|---|---|
@@ -0,0 +1,27 @@ | ||
// Copyright (c) Microsoft Corporation. All rights reserved. | ||
// Licensed under the MIT license. See LICENSE file in the project root for full license information. | ||
|
||
using System.IO; | ||
|
||
using Microsoft.VisualStudio.TestTools.UnitTesting; | ||
|
||
namespace DeploymentTestProject.PreserveNewest; | ||
[TestClass] | ||
public class FileDeploymentTests | ||
{ | ||
[TestMethod] | ||
[DeploymentItem(@"TestFiles1/some_file1")] | ||
public void FileWithForwardSlash() | ||
{ | ||
var fs = File.Open(@"some_file1", FileMode.Open); | ||
fs.Close(); | ||
} | ||
|
||
[TestMethod] | ||
[DeploymentItem(@"TestFiles2\some_file2")] | ||
public void FileWithBackSlash() | ||
{ | ||
var fs = File.Open(@"some_file2", FileMode.Open); | ||
fs.Close(); | ||
} | ||
} |