This file contains hidden or 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
public partial class App : Application | |
{ | |
public App() | |
{ | |
InitializeComponent(); | |
var mainPage = new NavigationPage(new MainPage()); | |
MainPage = mainPage; | |
} | |
// .... |
This file contains hidden or 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
<Project Sdk="Microsoft.NET.Sdk"> | |
<PropertyGroup> | |
<TargetFramework>netstandard1.6</TargetFramework> | |
<PackageTargetFallback>$(PackageTargetFallback);portable-win+net45+wp8+win81+wpa8</PackageTargetFallback> | |
</PropertyGroup> | |
</Project> |
This file contains hidden or 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
$here = Split-Path -Parent $MyInvocation.MyCommand.Path | |
$sut = (Split-Path -Leaf $MyInvocation.MyCommand.Path) -replace '\.Tests\.', '.' | |
. "$here\$sut" | |
$mockReply = @("Monday.txt", "Tuesday.txt", "Wednesday.txt") | |
Describe "HasEntryInDirectory" { | |
Context "If the filename exists in the directory" { | |
Mock Get-ChildItem {return $mockReply} |
This file contains hidden or 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
$here = Split-Path -Parent $MyInvocation.MyCommand.Path | |
$sut = (Split-Path -Leaf $MyInvocation.MyCommand.Path) -replace '\.Tests\.', '.' | |
. "$here\$sut" | |
$mockReply = @("Monday.txt", "Tuesday.txt", "Wednesday.txt") | |
Describe "HasEntryInDirectory" { | |
Context "If the filename exists in the directory" { | |
Mock Get-ChildItem {return $mockReply} |
This file contains hidden or 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
$here = Split-Path -Parent $MyInvocation.MyCommand.Path | |
$sut = (Split-Path -Leaf $MyInvocation.MyCommand.Path) -replace '\.Tests\.', '.' | |
. "$here\$sut" | |
$mockReply = @("Monday.txt", "Tuesday.txt", "Wednesday.txt") | |
Describe "HasEntryInDirectory" { | |
Context "If the filename exists in the directory" { | |
Mock Get-ChildItem {return $mockReply} |
This file contains hidden or 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
function HasEntryInDirectory($filename, $path) { | |
$entries = Get-ChildItem -Path $path | |
$entries -contains $filename | |
} |
This file contains hidden or 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
using System; | |
using System.IO; | |
using System.Linq; | |
using Moq; | |
using Xunit; | |
namespace CSharpSample | |
{ | |
public interface IDirectory | |
{ |
This file contains hidden or 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
$here = Split-Path -Parent $MyInvocation.MyCommand.Path | |
$sut = (Split-Path -Leaf $MyInvocation.MyCommand.Path) -replace '\.Tests\.', '.' | |
. "$here\$sut" | |
Describe "IsEvenNumber" { | |
Context "When an even number is passed to the function" { | |
$result = IsEvenNumber(42) | |
It "Returns true" { |