コード例 #1
0
        public void GetAllStatuses_ReturnsAListOfStatusesOfLengthZero_WhenCalledAndTheDatabaseIsEmpty()
        {
            // Arrange
            int expected = 0;
            SqlServerStatusRepository statusRepo = new SqlServerStatusRepository(context);

            // Act
            int actual = statusRepo.GetAllStatuses().Count();

            // Assert
            Assert.AreEqual(expected, actual);
        }
コード例 #2
0
        public void GetAllStatuses_ReturnsAListOfStatusesOfLengthOne_WhenCalledAndTheDatabaseHasOneStatusObject()
        {
            // Arrange
            int expected = 1;

            InsertData();
            SqlServerStatusRepository statusRepo = new SqlServerStatusRepository(context);

            // Act
            int actual = statusRepo.GetAllStatuses().Count();

            // Assert
            Assert.AreEqual(expected, actual);
        }