Exemplo n.º 1
0
        public void GivenFixtureWhenStateIsNotNullAndContentNullThenIsSnapshotNeededReturnsFalse()
        {
            //
            //Arrange
            //
            var fixtureValidation = new FixtureValidation();

            //
            //Act
            //
            bool isSnapshotNeeded = fixtureValidation.IsSnapshotNeeded(
                _resourceFacadeMock.Object,
                new FixtureState());

            //
            //Assert
            //
            Assert.IsFalse(isSnapshotNeeded);
        }
Exemplo n.º 2
0
        public void GivenFixtureWhenStateIsNullThenIsSnapshotNeededReturnsTrue()
        {
            //
            //Arrange
            //
            var fixtureValidation = new FixtureValidation();

            //
            //Act
            //
            bool isSnapshotNeeded = fixtureValidation.IsSnapshotNeeded(
                It.IsAny <IResourceFacade>(),
                null);

            //
            //Assert
            //
            Assert.IsTrue(isSnapshotNeeded);
        }
Exemplo n.º 3
0
        public void GivenFixtureWhenSequenceDifferentThanStateSequenceThenIsSnapshotNeededReturnsTrue()
        {
            //
            //Arrange
            //
            _resourceFacadeMock.SetupGet(o => o.Content).Returns(new Summary {
                Sequence = 4
            });
            var fixtureValidation = new FixtureValidation();

            //
            //Act
            //
            bool isSnapshotNeeded = fixtureValidation.IsSnapshotNeeded(
                _resourceFacadeMock.Object,
                new FixtureState {
                Sequence = 3
            });

            //
            //Assert
            //
            Assert.IsTrue(isSnapshotNeeded);
        }