Ejemplo n.º 1
0
        public void GetMainWindowVM()
        {
            ioc.Register(() => AuthProvider.Default);
            ioc.Register <GraphManager>();
            ioc.Register <MainWindowVM>();
            ioc.Register <LocalItemFactory>();
            ioc.Register <OneDriveItemFactory>();
            var authProvider = ioc.GetSingleton <AuthProvider>();
            var graphManager = ioc.GetSingleton <GraphManager>();
            var mainWindowVM = ioc.GetSingleton <MainWindowVM>();

            Assert.NotNull(authProvider);
            Assert.NotNull(graphManager);
            Assert.NotNull(mainWindowVM);
        }
Ejemplo n.º 2
0
        public void Reset_IsRegister_False()
        {
            //Given

            ioc.Register <MyClass>();
            //When
            ioc.Reset();
            //Then
            bool condition = ioc.IsRegistered <MyClass>();

            Assert.False(condition);
        }