Ejemplo n.º 1
0
        public void Version_Equals_null_Is_Parsed_Correctly()
        {
            var appEnv = new WebApplicationEnvironment()
            {
                ApplicationVersion = null
            };

            var provider = new WebVersionProvider(appEnv);

            Assert.Equal("", provider.GetCurrentVersion().MajorVersion);
        }
Ejemplo n.º 2
0
        public void Buildnumber_Is_Parsed_Correctly(string version, string buildnr)
        {
            var appEnv = new WebApplicationEnvironment()
            {
                ApplicationVersion = version
            };

            var provider = new WebVersionProvider(appEnv);

            Assert.Equal(buildnr, provider.GetCurrentVersion().BuildNumber);
        }
Ejemplo n.º 3
0
        public void ApplicationBasePath_Equals_null_Is_Parsed_Correctly()
        {
            var appEnv = new WebApplicationEnvironment()
            {
                ApplicationBasePath = null
            };

            var provider = new WebVersionProvider(appEnv);

            Assert.Equal("?", provider.GetCurrentVersion().BuildDate);
        }
Ejemplo n.º 4
0
        public void RevisionVersion_Is_Parsed_Correctly(string version, string revision)
        {
            var appEnv = new WebApplicationEnvironment()
            {
                ApplicationVersion = version
            };

            var provider = new WebVersionProvider(appEnv);

            Assert.Equal(revision, provider.GetCurrentVersion().Revision);
        }
Ejemplo n.º 5
0
        public StateView()
        {
            InitializeComponent();

            if (DesignerProperties.GetIsInDesignMode(this))
            {
                var appConfiguration        = new CapFrameXConfiguration();
                var statisticProvider       = new FrametimeStatisticProvider(appConfiguration);
                var recordDirectoryObserver = new RecordDirectoryObserver(appConfiguration,
                                                                          new LoggerFactory().CreateLogger <RecordDirectoryObserver>());
                var recordDataProvider = new RecordDataProvider(recordDirectoryObserver, appConfiguration,
                                                                new LoggerFactory().CreateLogger <RecordDataProvider>());
                var overlayEntryProvider = new OverlayEntryProvider();
                var appVersionProvider   = new AppVersionProvider();
                var webVersionProvider   = new WebVersionProvider();
                DataContext = new StateViewModel(new RecordDirectoryObserver(appConfiguration,
                                                                             new LoggerFactory().CreateLogger <RecordDirectoryObserver>()),
                                                 new EventAggregator(), appConfiguration, new PresentMonCaptureService(),
                                                 new OverlayService(statisticProvider, recordDataProvider, overlayEntryProvider, appConfiguration,
                                                                    new LoggerFactory().CreateLogger <OverlayService>()),
                                                 new UpdateCheck(appVersionProvider, webVersionProvider), appVersionProvider, webVersionProvider);
            }
        }