Ejemplo n.º 1
0
        public void RetrieveBasicInformationTest_withValidID_AdditionalInfo(string value)
        {
            // Arrange
            FilmLengthItem item = new FilmLengthItem("_xx1", "FilmLength");

            item.BaseTableName = value;

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

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

            Assert.AreEqual("_xx1", item.ID);
            Assert.AreEqual($"{value} FilmLength Length X1", item.Length);
            Assert.AreEqual($"{value} FilmLength Details X1", item.Details);
            Assert.AreEqual("_xxx", item.Status.ID);
            Assert.AreEqual($"{value} FilmLength LastUpdated X1", item.LastUpdated);
        }
Ejemplo n.º 2
0
        public void RetrieveBasicInformationTest_withInvalidID_AdditionalInfo(string value)
        {
            // Arrange
            FilmLengthItem item = new FilmLengthItem("_aaa", "FilmLength");

            item.BaseTableName = value;

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

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

            Assert.AreEqual("_aaa", item.ID);
            Assert.IsNull(item.Length);
            Assert.IsNull(item.Details);
            Assert.IsNull(item.Status);
            Assert.IsNull(item.LastUpdated);
        }