[ https://issues.apache.org/jira/browse/GEODE-9360?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17376657#comment-17376657 ]
ASF GitHub Bot commented on GEODE-9360: --------------------------------------- pdxcodemonkey commented on a change in pull request #823: URL: https://github.com/apache/geode-native/pull/823#discussion_r665494772 ########## File path: netcore/NetCore.Test/CacheFactoryUnitTest.cs ########## @@ -0,0 +1,97 @@ +/* +* Licensed to the Apache Software Foundation (ASF) under one or more +* contributor license agreements. See the NOTICE file distributed with +* this work for additional information regarding copyright ownership. +* The ASF licenses this file to You under the Apache License, Version 2.0 +* (the "License"); you may not use this file except in compliance with +* the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +using System; +using Apache.Geode.NetCore; +using Xunit; + +namespace GemfireDotNetTest +{ + [Collection("Geode .net Core Collection")] + public class CacheFactoryUnitTests + { + [Fact] + public void TestCreateFactory() + { + using (var cacheFactory = CacheFactory.Create()) + { + Assert.NotNull(cacheFactory); + } + } + + [Fact] + public void TestCacheFactoryGetVersion() + { + using (var cacheFactory = CacheFactory.Create()) + { + var version = cacheFactory.Version; + Assert.NotEqual(version, String.Empty); + } + } + + [Fact] + public void TestCacheFactoryGetProductDescription() + { + using (var cacheFactory = CacheFactory.Create()) + { + var description = cacheFactory.ProductDescription; + Assert.NotEqual(description, String.Empty); + } + } + + [Fact] + public void TestCacheFactorySetPdxIgnoreUnreadFields() + { + using (var cacheFactory = CacheFactory.Create()) + { + cacheFactory.PdxIgnoreUnreadFields = true; + cacheFactory.PdxIgnoreUnreadFields = false; + } + } + + [Fact] + public void TestCacheFactorySetPdxReadSerialized() + { + using (var cacheFactory = CacheFactory.Create()) + { + cacheFactory.PdxReadSerialized = true; + cacheFactory.PdxReadSerialized = false; + } + } + + [Fact] + public void TestCacheFactoryCreateCache() + { + using (var cacheFactory = CacheFactory.Create()) + { + using (var cache = cacheFactory.CreateCache()) // lgtm[cs / useless - assignment - to - local] + { + ; + } + } + } + + [Fact] + public void TestCacheFactorySetProperty() + { + using (var cacheFactory = CacheFactory.Create()) + { + cacheFactory.SetProperty("log-level", "none") + .SetProperty("log-file", "geode_native.log"); + } + } + } +} Review comment: Manually added newline at EOF. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: notifications-unsubscr...@geode.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org > Initial revision of .net core support > ------------------------------------- > > Key: GEODE-9360 > URL: https://issues.apache.org/jira/browse/GEODE-9360 > Project: Geode > Issue Type: Improvement > Components: native client > Reporter: Blake Bender > Priority: Major > Labels: pull-request-available > > As a .net core developer, I would like to be able to access the geode-native > API. To facilitate this, we need to implement a minimal set of C# classes > that use p/invoke to access geode-native via C bindings (GEODE-9358). -- This message was sent by Atlassian Jira (v8.3.4#803005)