Beispiel #1
0
        public void GetAllTimeframes_returnsProperCollection()
        {
            //Arrange
            Mock <ITimeframeService> mockService = new Mock <ITimeframeService>();
            var expectedTimeframes = getTimeframesCollection();

            mockService.Setup(s => s.GetAllTimeframes()).Returns(expectedTimeframes);
            Timeframe.injectService(mockService.Object);

            //Act.
            var timeframes = Timeframe.GetAllTimeframes();

            //Assert.
            bool areEquivalent = timeframes.HasTheSameItems(expectedTimeframes);

            Assert.IsTrue(areEquivalent);
        }