示例#1
0
        public void RetrieveAdditionalInformationTest_withInvalidID(string value)
        {
            // Arrange
            LaboratoryItem item = new LaboratoryItem("_aa1", "Laboratory");

            item.BaseTableName = value;

            // Act
            int count = item.RetrieveAdditionalInformation();

            // Assert
            Assert.AreEqual(0, count);
        }
示例#2
0
        public void LaboratoryItemTest_withID()
        {
            // Arrange
            LaboratoryItem item = new LaboratoryItem("_xx1", "Laboratory");

            // Act
            // Assert
            Assert.IsNotNull(item);
            Assert.IsNotNull(item.Reader);
            Assert.AreEqual("", item.BaseTableName);
            Assert.AreEqual("Laboratory", item.TargetTableName);

            Assert.AreEqual("_xx1", item.ID);
            Assert.IsNull(item.Laboratory);
            Assert.IsNull(item.Details);
            Assert.IsNull(item.Status);
            Assert.IsNull(item.LastUpdated);
        }
示例#3
0
        public void RetrieveBasicInformationTest_withValidID_AdditionalInfo(string value)
        {
            // Arrange
            LaboratoryItem item = new LaboratoryItem("_xx1", "Laboratory");

            item.BaseTableName = value;

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

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

            Assert.AreEqual("_xx1", item.ID);
            Assert.AreEqual("_xxx", item.Laboratory.ID);
            Assert.AreEqual($"{value} Laboratory Details X1", item.Details);
            Assert.AreEqual("_xxx", item.Status.ID);
            Assert.AreEqual($"{value} Laboratory LastUpdated X1", item.LastUpdated);
        }
示例#4
0
        public void RetrieveTest_withInvalidID_AdditionalInfo(string value)
        {
            // Arrange
            LaboratoryItem item = new LaboratoryItem("_aa1", "Laboratory");

            item.BaseTableName = value;

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

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

            Assert.AreEqual("_aa1", item.ID);
            Assert.IsNull(item.Laboratory);
            Assert.IsNull(item.Details);
            Assert.IsNull(item.Status);
            Assert.IsNull(item.LastUpdated);
        }