Exemplo n.º 1
0
        public void Bagname_is_set_from_constructor()
        {
            const string ExpectedBagName = "My/File/Path.bag";

            var target = new RosbagScenario(ExpectedBagName);

            target.RosbagFile.Should().BeSameAs(ExpectedBagName);
        }
Exemplo n.º 2
0
        public void Load_loads_messages()
        {
            const string ExpectedBagFileName = "filepath.bag";

            var rosbagReaderMock = new Mock <IRosbagReader>(MockBehavior.Strict);

            rosbagReaderMock
            .Setup(x => x.Read(ExpectedBagFileName))
            .Returns(Enumerable.Empty <IRecordedMessage>());

            RosbagReader.Instance = rosbagReaderMock.Object;
            var target = new RosbagScenario(ExpectedBagFileName);

            target.Messages.Should().NotBeNull();
        }