public void GivenCreateCalled_WhenDispose_ThenIsReadyFalse() { using (MemoryStream stream = new MemoryStream()) { byte[] templateData = File.ReadAllBytes(@"TestData\StudentProfileExportTemplate.xltx"); stream.Write(templateData, 0, (int)templateData.Length); var target = new StudentProfileExportFile(); try { target.Create(stream); } finally { target.Dispose(); } Assert.IsFalse(target.IsReady); } }