public void ConstructorSetsServerPropertyCorrectly([Values(true, false)]bool serverCanModifyLastModificationDate) {
            var session = new Mock<ISession>();
            session.SetupTypeSystem(serverCanModifyLastModificationDate);
            var underTest = new SolverClass(session.Object, Mock.Of<IMetaDataStorage>());

            Assert.That(underTest.GetModification(), Is.EqualTo(serverCanModifyLastModificationDate));
        }
Пример #2
0
        public void ConstructorSetsServerPropertyCorrectly()
        {
            var solver = new SolverClass(Mock.Of <ISession>(), Mock.Of <IMetaDataStorage>(), true);

            Assert.That(solver.GetModification(), Is.True);
            solver = new SolverClass(Mock.Of <ISession>(), Mock.Of <IMetaDataStorage>(), false);
            Assert.That(solver.GetModification(), Is.False);
        }
        public void ConstructorSetsModificationPossibilityToFalse()
        {
            var session = new Mock <ISession>();

            session.SetupTypeSystem(false);
            var underTest = new SolverClass(session.Object, Mock.Of <IMetaDataStorage>());

            Assert.That(underTest.GetModification(), Is.False);
        }
        public void ConstructorSetsServerPropertyCorrectly([Values(true, false)] bool serverCanModifyLastModificationDate)
        {
            var session = new Mock <ISession>();

            session.SetupTypeSystem(serverCanModifyLastModificationDate);
            var underTest = new SolverClass(session.Object, Mock.Of <IMetaDataStorage>());

            Assert.That(underTest.GetModification(), Is.EqualTo(serverCanModifyLastModificationDate));
        }
        public void ConstructorSetsServerPropertyCorrectly()
        {
            var session = new Mock <ISession>();

            session.SetupTypeSystem(true);

            var underTest = new SolverClass(session.Object, Mock.Of <IMetaDataStorage>());

            Assert.That(underTest.GetModification(), Is.True);
        }