public void Parse_ShouldParsePRFIdentifier() { var expected = new PRFIdentifier("ACCESSION", "0806162C"); var actual = IdentifierParser.Parse("prf|ACCESSION|0806162C") as PRFIdentifier; Assert.IsNotNull(actual); Assert.AreEqual(expected.Code, actual.Code); Assert.AreEqual(expected.Accession, actual.Accession); Assert.AreEqual(expected.Name, actual.Name); }
public void ToString_ShouldFormatCorrectly() { Identifier identifier = new PRFIdentifier(Accession, Name); Assert.AreEqual($"{Code}|{Accession}|{Name}", identifier.ToString()); }
public void Code_ShouldReturnCorrectValue() { Identifier identifier = new PRFIdentifier(Accession, Name); Assert.AreEqual(Code, identifier.Code); }
public void Constructor_ShouldRejectWhitespaceName() { _ = new PRFIdentifier(Accession, " "); }
public void Constructor_ShouldRejectEmptyName() { _ = new PRFIdentifier(Accession, ""); }
public void Constructor_ShouldRejectNullName() { _ = new PRFIdentifier(Accession, null); }
public void Constructor_ShouldRejectWhitespaceAccessionNumber() { _ = new PRFIdentifier(" ", Name); }
public void Constructor_ShouldRejectNullAccessionNumber() { _ = new PRFIdentifier(null, Name); }