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 class ExcludeFilesTest | |
{ | |
[Test] | |
public void Exclude_File_With_Keyword() | |
{ | |
var wavExtractor = Substitute.For<WavExtractor32V>(); | |
var excludeFiles = new ExcludeFiles(wavExtractor); | |
var filenames = new List<string>() | |
{ |
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
export class ArgentRoseStore | |
// ... | |
private updateQuality(product: Product): void { | |
if (product.isTheatrePasses()) { | |
if (product.sellIn < 0) { | |
product.dropQualityToMinimum(); | |
} else if (product.sellIn < 5) { | |
product.increaseQualityBy(3); | |
} else { |
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
import {Alarm} from "../src/Alarm"; | |
describe("Alarm", () => { | |
const lowestSafePressure: number = 17; | |
const highestSafePressure: number = 21; | |
const tooLowPressure: number = lowestSafePressure - 1; | |
const tooHighPressure: number = highestSafePressure + 1; | |
let alarm: AlarmForTesting; | |
it("activates when sampled pressure is too low", () => { |
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
import {ArgentRoseStore} from "../src/ArgentRoseStore"; | |
import {Product} from "../src/Product"; | |
describe("ArgentRoseStore", () => { | |
it("Regular Product decreases quality by two", async () => { | |
const store = storeIncluding(regularProduct(1, 10)); | |
await store.update(); | |
expect(store.getSavedInventory()).toEqual(inventoryIncluding(regularProduct(0, 8))); |
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
import {ArgentRoseStore} from "../src/ArgentRoseStore"; | |
import {Product} from "../src/Product"; | |
describe("ArgentRoseStore", () => { | |
it("Regular Product decreases quality by two", async () => { | |
const store = storeIncluding(regularProduct(1, 10)); | |
await store.update(); | |
expect(store.getSavedInventory()).toEqual(inventoryIncluding(regularProduct(0, 8))); |
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
import {ArgentRoseStore} from "../src/ArgentRoseStore"; | |
import {Product} from "../src/Product"; | |
describe("ArgentRoseStore", () => { | |
it("Regular Product decreases quality by two", async () => { | |
const store = storeIncluding(regularProduct(5, 10)); | |
await store.update(); | |
expect(store.getSavedInventory()).toEqual(inventoryIncluding(regularProduct(4, 8))); |
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
import {ArgentRoseStore} from "../src/ArgentRoseStore"; | |
import {Product} from "../src/Product"; | |
describe("ArgentRoseStore", () => { | |
it("Regular Product decreases quality by two", async () => { | |
const store = storeIncluding(regularProduct(1, 10)); | |
await store.update(); | |
expect(store.getSavedInventory()).toEqual(inventoryIncluding(regularProduct(0, 8))); |
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
import {Game} from "../src/game"; | |
describe('Ugly trivia', () => { | |
it('simulation with 5 players', () => { | |
const rollNumbers = [ | |
3, 6, 1, 6, 4, 5, 3, 2, | |
3, 4, 1, 5, 1, 5, 6, 3, | |
3, 5, 5, 3, 5, 3, 4, 2, | |
1, 4, 4, 5 | |
]; |
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 class ConjugatedGradient { | |
private readonly double tolerance; | |
private readonly int maxIterations; | |
public ConjugatedGradient(double tolerance = 1e-6, int maxIterations = 1000) { | |
this.tolerance = tolerance; | |
this.maxIterations = maxIterations; | |
} | |
public double[] Minimize( |
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 class ConjugatedGradient { | |
private final double tolerance; | |
private final int maxIterations; | |
public ConjugatedGradient(double tolerance = 1e-6, int maxIterations = 1000) { | |
this.tolerance = tolerance; | |
this.maxIterations = maxIterations; | |
} | |
public double[] minimize( |
NewerOlder