public void Valid_CastingToNorthPoleCredental_ReevaluatesValidity(string credentialString, bool passportValidExpectedValue, bool northPoleValidExpectedValue) { var sut = new sut.PassportCredential(credentialString); Assert.Equal(passportValidExpectedValue, sut.Valid); Assert.Equal(northPoleValidExpectedValue, ((sut.NorthPoleCredential)sut).Valid); }
public void PassportCredential_GivenValidCredentialString_SetsPropertiesAppropriately() { var byr = "1937"; var iyr = "2017"; var eyr = "2020"; var hgt = "183cm"; var hcl = "#fffffd"; var ecl = "gry"; var pid = "860033327"; var cid = "147"; var sut = new sut.PassportCredential($@"ecl:{ecl} pid:{pid} eyr:{eyr} hcl:{hcl} byr:{byr} iyr:{iyr} cid:{cid} hgt:{hgt}"); Assert.Equal(sut.byr, byr); Assert.Equal(sut.iyr, iyr); Assert.Equal(sut.eyr, eyr); Assert.Equal(sut.hgt, hgt); Assert.Equal(sut.hcl, hcl); Assert.Equal(sut.ecl, ecl); Assert.Equal(sut.pid, pid); Assert.Equal(sut.cid, cid); Assert.True(sut.Valid); }
public void Valid_GivenCredentialString_ReturnsExpectedValue(string credentialString, bool expectedValue) { var sut = new sut.PassportCredential(credentialString); Assert.Equal(expectedValue, sut.Valid); }