public void TestSaveSimpleData() { StubDataStore stubDataStore = new StubDataStore(); SimpleService simpleServiceToTest = new SimpleService(stubDataStore); var simpleData = TestUtils.GetRandomSimpleData(); simpleServiceToTest.SaveSimpleData(simpleData); }
public void TestNullSaveSimpleData() { StubDataStore stubDataStore = new StubDataStore(); SimpleService simpleServiceToTest = new SimpleService(stubDataStore); Assert.Throws(typeof(ArgumentNullException), () => { simpleServiceToTest.SaveSimpleData(null); }); }
public void ServiceSaveSimple() { StubDataStore stubDataStore = new StubDataStore(); SimpleService simpleServiceToTest = new SimpleService(stubDataStore); Guid theID = Guid.NewGuid(); var simpleData = new SimpleData(theID, "test1", 1000); simpleServiceToTest.SaveSimpleData(simpleData); var dataBack = simpleServiceToTest.GetSimpleData(theID); Assert.Equal(simpleData, dataBack); }