Exemplo n.º 1
0
        public void Setup()
        {
            ErrorReport.IsOkToInteractWithUser = false;
            _folder = new TemporaryFolder("CollectionModelTests");

            // ENHANCE: Sometimes making the FakeCollection temporary folder causes an UnauthorizedAccessException.
            // Not exactly sure why or what to do about it. Possibly it could be related to file system operations
            // being async in nature???
            _collection = new TemporaryFolder(_folder, "FakeCollection");
            MakeFakeCssFile();
            _testCollectionModel = new FakeCollectionModel(_collection);
        }
        /// <summary>
        /// Initializes a new instance of the <see cref="FakeCollectionViewModel"/> class.
        /// </summary>
        /// <param name="model">The model.</param>
        public FakeCollectionViewModel(FakeCollectionModel model)
        {
            Model = model;

            this.WhenAny(x => x.Model.SomeNumber, x => x.Value.ToString()).ToProperty(this, x => x.NumberAsString, out _numberAsString);
        }