Beispiel #1
0
        public void RavenDBProviderConnection()
        {
            DataProviderBase provider = new RavenDBDataProvider(new ConnectionParams()
            {
                Database = "Zenith",
                Port = 8080,
                Url = "http://localhost",
                OpenImmidiately = false
            });

            provider.Open();

            Assert.IsTrue(provider.IsOpen);
        }
Beispiel #2
0
        public void RavenDBProviderInsert()
        {
            DataProviderBase provider = new RavenDBDataProvider(new ConnectionParams()
            {
                Database = "Zenith",
                Port = 8080,
                Url = "http://localhost",
                OpenImmidiately = false
            });

            provider.Open();

            User user = new User()
            {
                Username = "******",
                AccessToken = "",
                EmailAddress = "*****@*****.**",
                Id = 23,
                IsValid = true
            };

            DataPayload<User> payload = new DataPayload<User>()
            {
                Entity = user,
                Identifier = null
            };

            DataResult result = provider.Execute(Operation.Insert, payload);

            Assert.IsNotNull(result);

            provider.Close();

            Assert.IsFalse(provider.IsOpen);
        }