Example #1
0
        public void RetrieveBasicInformationTest_withValidID_BasicInfoOnly(string value)
        {
            // Arrange
            AwardItem item = new AwardItem("_xx1", "Award");

            item.BaseTableName = value;

            // Act
            int count = item.RetrieveBasicInformation(true);

            // Assert
            Assert.AreEqual(1, count);

            Assert.AreEqual("_xx1", item.ID);
            Assert.AreEqual("_xxx", item.Award.ID);
            Assert.AreEqual($"{value} Award Category X1", item.Category);
            Assert.AreEqual($"{value} Award Date X1", item.Date);
            Assert.AreEqual($"1", item.Winner);
            Assert.AreEqual($"{value} Award Details X1", item.Details);
            Assert.AreEqual("_xxx", item.Status.ID);
            Assert.AreEqual($"{value} Award LastUpdated X1", item.LastUpdated);

            Assert.IsNull(item.Persons);
        }
Example #2
0
        public void RetrieveBasicInformationTest_withInvalidID_AdditionalInfo(string value)
        {
            // Arrange
            AwardItem item = new AwardItem("_aa1", "Award");

            item.BaseTableName = value;

            // Act
            int count = item.RetrieveBasicInformation(false);

            // Assert
            Assert.AreEqual(0, count);

            Assert.AreEqual("_aa1", item.ID);
            Assert.IsNull(item.Award);
            Assert.IsNull(item.Category);
            Assert.IsNull(item.Date);
            Assert.IsNull(item.Winner);
            Assert.IsNull(item.Details);
            Assert.IsNull(item.Status);
            Assert.IsNull(item.LastUpdated);

            Assert.IsNull(item.Persons);
        }