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
{ | |
"projects": [ "src", "test" ], | |
"sdk": { | |
"version": "1.0.0-preview2-003121" | |
} | |
} |
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
{ | |
"projects": [ | |
"src", | |
"../../IEvangelist.NetCore.ClassLib/src", | |
"../../IEvangelist.NetCore.Services/src" | |
] | |
} |
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
{ | |
"version": "1.0.0-*", | |
"compilationOptions": { | |
"emitEntryPoint": true | |
}, | |
"dependencies": { | |
"Microsoft.AspNet.Mvc": "6.0.0-rc1-final", | |
"Microsoft.AspNet.Mvc.TagHelpers": "6.0.0-rc1-final", | |
"Microsoft.AspNet.Server.Kestrel": "1.0.0-rc1-final", |
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
{ | |
"version": "1.0.0-*", | |
"compilationOptions": { | |
"emitEntryPoint": true | |
}, | |
"dependencies": { | |
"Microsoft.AspNet.Mvc": "6.0.0-rc1-final", | |
"Microsoft.AspNet.Mvc.TagHelpers": "6.0.0-rc1-final", | |
"Microsoft.AspNet.Server.Kestrel": "1.0.0-rc1-final", |
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
[alias] | |
del = "!f() { echo deleting remote $1 && git push origin --delete $1 && echo deleting local $1 && git branch -D $1; }; f"; |
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
[Theory, ClassData(typeof(Int32CalculatorTestData))] | |
public void AddTest(int leftOperand, int rightOperand, int expected) | |
{ | |
// Arrange | |
var calculator = new Int32Calculator(); | |
// Act | |
var actual = calculator.Add(leftOperand, rightOperand); | |
// Assert |
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.Collections; | |
using System.Collections.Generic; | |
namespace IEvangelist.CSharper.CalculatorTests | |
{ | |
public abstract class ClassTestData : IEnumerable<object[]> | |
{ | |
/// <summary>Container for known test data.</summary> | |
protected abstract List<object[]> TestData { get; } |
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
[Theory, InlineData(3, 3, 9), InlineData(2, 9, 18)] | |
public void MultiplyTest(int leftOperand, int rightOperand, int expected) | |
{ | |
// Arrange | |
var calculator = new Int32Calculator(); | |
// Act | |
var actual = calculator.Multiply(leftOperand, rightOperand); | |
// Assert |
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
[Fact] | |
public void SubstractTest() | |
{ | |
// Arrange | |
var calculator = new Int32Calculator(); | |
// Act | |
var actual = calculator.Subtract(77, 100); | |
// Assert |
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
namespace IEvangelist.CSharper.Calculator | |
{ | |
public class Int32Calculator : ICalculator<int> | |
{ | |
public int Add(int leftOperand, int rightOperand) => leftOperand + rightOperand; | |
public int Divide(int leftOperand, int rightOperand) => leftOperand / rightOperand; | |
public int Multiply(int leftOperand, int rightOperand) => leftOperand * rightOperand; | |
public int Subtract(int leftOperand, int rightOperand) => leftOperand - rightOperand; | |
} | |
} |