コード例 #1
0
 public void Setup()
 {
     _defaultProfile = new Fixtures.DefaultProfile();
     _otherProfile   = new Fixtures.OtherProfile();
     _messenger      = new Mock <IMessenger>();
     _profileStorage = new InMemoryProfileStorage(new List <IProfile>()
     {
         _defaultProfile, _otherProfile
     });
 }
コード例 #2
0
        public static IProfileManager CreateSimpleManager(IEnumerable <IProfile> profiles, IMessenger messenger = null)
        {
            IProfileStorage storage = new InMemoryProfileStorage(profiles.ToList());

            IProfileManager mgr = new ProfileManager(
                storage,
                messenger ?? Mock.Of <IMessenger>()
                );

            mgr.OpenDefaultProfile();

            return(mgr);
        }