Beispiel #1
0
        public void GetLogInfo_ShouldThrowExceptionOnZeroHandle()
        {
            var mock = new Mock<ILibsndfileCommandApi>();

            var api = new LibsndfileCommandApi(mock.Object);
            api.GetLogInfo(IntPtr.Zero);
        }
Beispiel #2
0
        public void GetLogInfo_ShouldThrowExceptionOnZeroHandle()
        {
            var mock = new Mock <ILibsndfileCommandApi>();

            var api = new LibsndfileCommandApi(mock.Object);

            api.GetLogInfo(IntPtr.Zero);
        }
Beispiel #3
0
        public void GetLogInfo_ShouldThrowExceptionOnNullStringReturned()
        {
            const string Log = null;

            var mock = new Mock<ILibsndfileCommandApi>();
            mock.Setup(x => x.GetLogInfo(It.IsAny<IntPtr>())).Returns(Log);

            var api = new LibsndfileCommandApi(mock.Object);
            api.GetLogInfo(new IntPtr(1));
        }
Beispiel #4
0
        public void GetLogInfo_ShouldThrowExceptionOnEmptyStringReturned()
        {
            const string Log = "";

            var mock = new Mock <ILibsndfileCommandApi>();

            mock.Setup(x => x.GetLogInfo(It.IsAny <IntPtr>())).Returns(Log);

            var api = new LibsndfileCommandApi(mock.Object);

            api.GetLogInfo(new IntPtr(1));
        }