public void An_Id_has_a_HASHCODE() { SerialIdGenerator idgen = new SerialIdGenerator(); Id newId1 = idgen.GenerateId(); Assert.IsNotNull(newId1.GetHashCode()); }
public void create_a_valid_Id() { SerialIdGenerator idgen = new SerialIdGenerator(); Id newId = idgen.GenerateId(); Assert.IsTrue(newId.IsValid); }
public void An_Id_has_an_unique_HASHCODE() { SerialIdGenerator idgen = new SerialIdGenerator(); Id newId1 = idgen.GenerateId(); Id newId2 = idgen.GenerateId(); Assert.IsTrue(newId1.GetHashCode() != newId2.GetHashCode()); }
public void An_Id_is_unique() { SerialIdGenerator idgen = new SerialIdGenerator(); Id newId1 = idgen.GenerateId(); Id newId2 = idgen.GenerateId(); Assert.IsFalse(newId1.Equals(newId2)); }
public void Finding_an_non_exising_account_throws_exception() { var customer = GivenCustomerKlaus(); var account1 = _bank.CreateAccount(customer); var account2 = _bank.CreateAccount(customer); var invalidID = new SerialIdGenerator().GenerateId(); Assert.Catch <AccountNotFoundException>(() => { _bank.FindAccount(invalidID); }); }
public void create_an_Id() { SerialIdGenerator idgen = new SerialIdGenerator(); Assert.IsNotNull(idgen.GenerateId()); }