-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from Thwaitesy/New-File-Per-Datasource
New file per datasource
- Loading branch information
Showing
9 changed files
with
117 additions
and
46 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
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
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,36 @@ | ||
using System; | ||
using Microsoft.VisualStudio.TestTools.UnitTesting; | ||
using MSTestHacks.RuntimeDataSource; | ||
using System.Collections.Generic; | ||
using System.Xml.Linq; | ||
using System.Xml; | ||
using System.Linq; | ||
|
||
namespace MSTestHacks.Tests.RuntimeDataSource | ||
{ | ||
[TestClass] | ||
[AttachRuntimeDataSources(typeof(SimpleObjects2))] | ||
public class SimpleObjects2 : TestBase | ||
{ | ||
const string PREFIX = "MSTestHacks.Tests.RuntimeDataSource.SimpleObjects2."; | ||
|
||
private int _publicPropertyCount = 14; | ||
public IEnumerable<int> PublicProperty | ||
{ | ||
get | ||
{ | ||
return Enumerable.Range(0, this._publicPropertyCount); | ||
} | ||
} | ||
|
||
[TestMethod] | ||
[DataSource(PREFIX + "PublicProperty")] | ||
public void Test_Simple_Objects_Injected_From_PublicProperty() | ||
{ | ||
//Make sure the object can be retrieved. | ||
var x = this.TestContext.GetRuntimeDataSourceObject<int>(); | ||
|
||
Assert.AreEqual(this._publicPropertyCount, this.TestContext.DataRow.Table.Rows.Count); | ||
} | ||
} | ||
} |
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