public void ServiceUsesCache()
        {
            var fileService = new Mock <IFileService>();
            var serializer  = new Mock <IApplicationDataSerializer>();

            serializer.Setup(s => s.Deserialize(It.IsAny <string>()))
            .Returns(new ApplicationData(new string[] { "toto", "titi", "tata" }));

            var service = new ApplicationDataService(fileService.Object, serializer.Object);

            var data = service.GetApplicationData();

            data = service.GetApplicationData();

            fileService.Verify(s => s.LoadApplicationDataFileContent(), Times.Once);
        }
        public void ServiceGetData()
        {
            var fileService = new Mock <IFileService>();
            var serializer  = new Mock <IApplicationDataSerializer>();

            serializer.Setup(s => s.Deserialize(It.IsAny <string>()))
            .Returns(new ApplicationData(new string[] { "toto", "titi", "tata" }));

            var service = new ApplicationDataService(fileService.Object, serializer.Object);

            var data = service.GetApplicationData();

            data.History.ShouldBe(new string[] { "toto", "titi", "tata" });
        }