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);
        }
Exemple #2
0
        public void ToString_ShouldFormatCorrectly()
        {
            Identifier identifier = new PRFIdentifier(Accession, Name);

            Assert.AreEqual($"{Code}|{Accession}|{Name}", identifier.ToString());
        }
Exemple #3
0
        public void Code_ShouldReturnCorrectValue()
        {
            Identifier identifier = new PRFIdentifier(Accession, Name);

            Assert.AreEqual(Code, identifier.Code);
        }
Exemple #4
0
 public void Constructor_ShouldRejectWhitespaceName()
 {
     _ = new PRFIdentifier(Accession, " ");
 }
Exemple #5
0
 public void Constructor_ShouldRejectEmptyName()
 {
     _ = new PRFIdentifier(Accession, "");
 }
Exemple #6
0
 public void Constructor_ShouldRejectNullName()
 {
     _ = new PRFIdentifier(Accession, null);
 }
Exemple #7
0
 public void Constructor_ShouldRejectWhitespaceAccessionNumber()
 {
     _ = new PRFIdentifier(" ", Name);
 }
Exemple #8
0
 public void Constructor_ShouldRejectNullAccessionNumber()
 {
     _ = new PRFIdentifier(null, Name);
 }