コード例 #1
0
        public void CreateGUID_WithMock_CalledCorrect()
        {
            //arrange
            GUIDMock    fake = new GUIDMock();
            FileHandler sut  = new FileHandler("C:\\Tempt\\DMS", fake);

            //act
            sut.CreateGUID();

            //assert
            Assert.That(fake.GuidCalled, Is.True);
        }
コード例 #2
0
        public void GuidSerialisation()
        {
            var guid     = Guid.NewGuid();
            var mockBase = new GUIDMock {
                TestField = guid
            };

            var result = Operations.Serialize(mockBase);
            var test   = (GUIDMock)Operations.Deserialize(result);

            Assert.AreEqual(guid, test.TestField);
        }