public void GetViewName_With_Default_Values_Succeeds()
        {
            var viewProvider  = new DefaultViewProvider();
            var viewModelType = typeof(SomeViewModel);

            var viewName = viewProvider.GetViewName(viewModelType, viewProvider.ViewModelNameSuffix, viewProvider.ViewNameSuffix);

            Assert.That(viewName, Is.EqualTo(nameof(SomeView)));
        }
        public void GetViewName_Throws()
        {
            var viewModelType = typeof(SomeViewModel);
            var viewProvider  = new DefaultViewProvider
                                (
                viewModelNamespaceSuffix: "",
                viewNamespaceSuffix: "",
                viewModelNameSuffix: Guid.NewGuid().ToString(),                 // This is not the name you are looking for.
                viewNameSuffix: ""
                                );

            // The defined view model suffix does not match.
            Assert.Throws <ViewProviderException>(() => viewProvider.GetViewName(viewModelType, viewProvider.ViewModelNameSuffix, viewProvider.ViewNameSuffix));
        }
        public void GetViewName_With_Custom_Values_Succeeds()
        {
            var viewModelType = typeof(SomeViewModel);
            var viewProvider  = new DefaultViewProvider
                                (
                viewModelNamespaceSuffix: "",
                viewNamespaceSuffix: "",
                viewModelNameSuffix: "del",
                viewNameSuffix: "hawk"
                                );

            var viewName = viewProvider.GetViewName(viewModelType, viewProvider.ViewModelNameSuffix, viewProvider.ViewNameSuffix);

            Assert.That(viewName, Is.EqualTo("SomeViewMohawk"));
        }
        public void GetViewName_Without_ViewModelNameSuffix_Succeeds()
        {
            var viewModelType = typeof(SomeViewModel);
            var viewProvider  = new DefaultViewProvider
                                (
                viewModelNamespaceSuffix: "",
                viewNamespaceSuffix: "",
                viewModelNameSuffix: "",
                viewNameSuffix: ""
                                );

            var viewName = viewProvider.GetViewName(viewModelType, viewProvider.ViewModelNameSuffix, viewProvider.ViewNameSuffix);

            Assert.That(viewName, Is.EqualTo(viewModelType.Name));
        }