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
interface Customer { | |
getEarnedDiscount(): number; | |
addToOrdersHistory(order: Order): void; | |
} | |
// Null Customer's implementation | |
class NotFoundCustomer implements Customer { | |
private DEFAULT_DISCOUNT: number = 1.0; |
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
class Coordinates { | |
public x: number; | |
public y: number; | |
constructor(x: number, y: number) { | |
this.x = x; | |
this.y = y; | |
} | |
} |
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
using NUnit.Framework; | |
namespace ArgentRose.Tests; | |
public class ArgentRoseStoreTest | |
{ | |
private const int MIN_QUALITY = 0; | |
private const int MAX_QUALITY = 50; | |
private const int SELLIN_LAST_DAY = 0; | |
private const int EXPIRED = -1; |
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
import {ArgentRoseStore} from "../src/ArgentRoseStore"; | |
import {Product} from "../src/Product"; | |
describe("Game Score Board", () => { | |
const MIN_QUALITY = 0; | |
const MAX_QUALITY = 50; | |
const SELLIN_LAST_DAY = 0; | |
const EXPIRED = -1; | |
let store: ArgentRoseStore; |
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
<?php | |
namespace tests; | |
use Codesai\TDD\ArgentRose\ArgentRoseStore; | |
use Codesai\TDD\ArgentRose\Product; | |
use PHPUnit\Framework\TestCase; | |
class ArgentRoseTest extends TestCase | |
{ |
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
package com.argentrose; | |
import static org.junit.jupiter.api.Assertions.assertEquals; | |
import org.junit.jupiter.api.BeforeEach; | |
import org.junit.jupiter.api.Test; | |
public class ArgentRoseStoreTest { | |
public static final int MIN_QUALITY = 0; |
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
using NUnit.Framework; | |
namespace ArgentRose.Tests; | |
public class ArgentRoseStoreTest | |
{ | |
private const int MIN_QUALITY = 0; | |
private const int MAX_QUALITY = 50; | |
private const int SELLIN_LAST_DAY = 0; | |
private const int EXPIRED = -1; |
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
import {ArgentRoseStore} from "../src/ArgentRoseStore"; | |
import {Product} from "../src/Product"; | |
describe("Game Score Board", () => { | |
const MIN_QUALITY = 0; | |
const MAX_QUALITY = 50; | |
const SELLIN_LAST_DAY = 0; | |
const EXPIRED = -1; | |
let store: ArgentRoseStore; |
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
<?php | |
namespace tests; | |
use Codesai\TDD\ArgentRose\ArgentRoseStore; | |
use Codesai\TDD\ArgentRose\Product; | |
use PHPUnit\Framework\TestCase; | |
class ArgentRoseTest extends TestCase | |
{ |
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
package com.argentrose; | |
import static org.junit.jupiter.api.Assertions.assertEquals; | |
import org.junit.jupiter.api.BeforeEach; | |
import org.junit.jupiter.api.Test; | |
public class ArgentRoseStoreTest { | |
public static final int MIN_QUALITY = 0; |
NewerOlder