Ejemplo n.º 1
0
        // TODO: Add more tests
        public void RetrieveBasicInformationTest_withInvalidID_AdditionalInfo(string value1, string value2)
        {
            // Arrange
            CompanyItem item = new CompanyItem("_aa1", "");

            item.BaseTableName   = value1;
            item.TargetTableName = value2.Replace(" ", "");

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

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

            Assert.AreEqual("_aa1", item.ID);
            Assert.IsNull(item.Company);
            Assert.IsNull(item.Role);
            Assert.IsNull(item.Details);
            Assert.IsNull(item.Status);
            Assert.IsNull(item.LastUpdated);
        }
Ejemplo n.º 2
0
        // TODO: Add more tests
        public void RetrieveBasicInformationTest_withValidID_AdditionalInfo(string value1, string value2)
        {
            // Arrange
            CompanyItem item = new CompanyItem("_xx1", "");

            item.BaseTableName   = value1;
            item.TargetTableName = value2.Replace(" ", "");

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

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

            Assert.AreEqual("_xx1", item.ID);
            Assert.AreEqual("_xxx", item.Company.ID);
            Assert.AreEqual($"{value1} {value2} Role X1", item.Role);
            Assert.AreEqual($"{value1} {value2} Details X1", item.Details);
            Assert.AreEqual("_xxx", item.Status.ID);
            Assert.AreEqual($"{value1} {value2} LastUpdated X1", item.LastUpdated);
        }