public void Can_Be_Searched_By_Name(){
            var persistentApplication1 = new PersistentApplication(Session.DefaultSession){UniqueName = "appname"};
            persistentApplication1.Save();
            var application = new QueryPersistentApplication(Session.DefaultSession);

            var persistentApplication = application.Find("appname");

            Assert.AreEqual(persistentApplication1, persistentApplication);
        }
예제 #2
0
        public void Cause_PersistentApplication_ShouldBe_Unique_Should_Query_DataStore_Befare_Creating_New(){
            var application = new PersistentApplication(Session.DefaultSession){UniqueName = "appName"};
            application.Save();
            var modelDifferenceObject = new ModelDifferenceObject(Session.DefaultSession);


            modelDifferenceObject.InitializeMembers("", "appName");

            Assert.AreEqual(application, modelDifferenceObject.PersistentApplication);
        }