public void ConstructorSetsPropertiesCorrectly() { var session = Mock.Of <ISession>(); var storage = Mock.Of <IMetaDataStorage>(); var solver = new SolverClass(session, storage); Assert.That(solver.GetSession(), Is.EqualTo(session)); Assert.That(solver.GetStorage(), Is.EqualTo(storage)); }
public void ConstructorSetsPropertiesCorrectly([Values(true, false)]bool withGivenTransmissionStorage) { var session = new Mock<ISession>(); session.SetupTypeSystem(); var storage = Mock.Of<IMetaDataStorage>(); var transmissionStorage = withGivenTransmissionStorage ? Mock.Of<IFileTransmissionStorage>() : null; var underTest = new SolverClass(session.Object, storage, transmissionStorage); Assert.That(underTest.GetSession(), Is.EqualTo(session.Object)); Assert.That(underTest.GetStorage(), Is.EqualTo(storage)); Assert.That(underTest.GetTransmissionStorage(), Is.EqualTo(transmissionStorage)); }
public void ConstructorSetsPropertiesCorrectly() { var session = new Mock <ISession>(); session.SetupTypeSystem(); var storage = Mock.Of <IMetaDataStorage>(); var underTest = new SolverClass(session.Object, storage); Assert.That(underTest.GetSession(), Is.EqualTo(session.Object)); Assert.That(underTest.GetStorage(), Is.EqualTo(storage)); }
public void ConstructorSetsPropertiesCorrectly([Values(true, false)] bool withGivenTransmissionStorage) { var session = new Mock <ISession>(); session.SetupTypeSystem(); var storage = Mock.Of <IMetaDataStorage>(); var transmissionStorage = withGivenTransmissionStorage ? Mock.Of <IFileTransmissionStorage>() : null; var underTest = new SolverClass(session.Object, storage, transmissionStorage); Assert.That(underTest.GetSession(), Is.EqualTo(session.Object)); Assert.That(underTest.GetStorage(), Is.EqualTo(storage)); Assert.That(underTest.GetTransmissionStorage(), Is.EqualTo(transmissionStorage)); }